1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

shellcheck fix: tests/functional/supplementary-groups.sh

This commit is contained in:
Farid Zakaria 2025-09-30 20:19:27 -07:00
parent 8c9bfb6e12
commit b349783830
2 changed files with 3 additions and 3 deletions

View file

@ -106,7 +106,6 @@
enable = true; enable = true;
excludes = [ excludes = [
# We haven't linted these files yet # We haven't linted these files yet
''^tests/functional/supplementary-groups\.sh$''
''^tests/functional/toString-path\.sh$'' ''^tests/functional/toString-path\.sh$''
''^tests/functional/user-envs-migration\.sh$'' ''^tests/functional/user-envs-migration\.sh$''
''^tests/functional/user-envs-test-case\.sh$'' ''^tests/functional/user-envs-test-case\.sh$''

View file

@ -9,6 +9,7 @@ needLocalStore "The test uses --store always so we would just be bypassing the d
TODO_NixOS TODO_NixOS
# shellcheck disable=SC2119
execUnshare <<EOF execUnshare <<EOF
source common.sh source common.sh
@ -26,12 +27,12 @@ execUnshare <<EOF
setLocalStore store1 setLocalStore store1
expectStderr 1 "\${cmd[@]}" | grepQuiet "setgroups failed" expectStderr 1 "\${cmd[@]}" | grepQuiet "setgroups failed"
# Fails with `require-drop-supplementary-groups` # Fails with $(require-drop-supplementary-groups)
setLocalStore store2 setLocalStore store2
NIX_CONFIG='require-drop-supplementary-groups = true' \ NIX_CONFIG='require-drop-supplementary-groups = true' \
expectStderr 1 "\${cmd[@]}" | grepQuiet "setgroups failed" expectStderr 1 "\${cmd[@]}" | grepQuiet "setgroups failed"
# Works without `require-drop-supplementary-groups` # Works without $(require-drop-supplementary-groups)
setLocalStore store3 setLocalStore store3
NIX_CONFIG='require-drop-supplementary-groups = false' \ NIX_CONFIG='require-drop-supplementary-groups = false' \
"\${cmd[@]}" "\${cmd[@]}"