diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:50:55 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 07:50:55 +0100 |
commit | 180984178dc4e063607f6e9e94eb2fdfedbfe452 (patch) | |
tree | 073cde58b67bbc9b6e2c1ecade8ee14f508f24be /tests/functional/shell.sh | |
parent | aaf1ed1a4cf0ca53f5324932fe13769cb2b69f74 (diff) |
Merge pull request #9648 from cole-h/nix-shell-ordering
nix shell: reflect command line order in PATH order
(cherry picked from commit b91c935c2faf08ced2c763dcd2a831f26d84fa86)
Change-Id: If16c120bb74857c2817366e74e5b0877eb997260
Diffstat (limited to 'tests/functional/shell.sh')
-rw-r--r-- | tests/functional/shell.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional/shell.sh b/tests/functional/shell.sh index d2f7cf14e..8bbeabedf 100644 --- a/tests/functional/shell.sh +++ b/tests/functional/shell.sh @@ -10,6 +10,14 @@ nix shell -f shell-hello.nix hello -c hello NixOS | grep 'Hello NixOS' nix shell -f shell-hello.nix hello^dev -c hello2 | grep 'Hello2' nix shell -f shell-hello.nix 'hello^*' -c hello2 | grep 'Hello2' + +if isDaemonNewer "2.20.0pre20231220"; then + # Test that command line attribute ordering is reflected in the PATH + # https://github.com/NixOS/nix/issues/7905 + nix shell -f shell-hello.nix hello salve-mundi -c hello | grep 'Hello World' + nix shell -f shell-hello.nix salve-mundi hello -c hello | grep 'Salve Mundi' +fi + requireSandboxSupport chmod -R u+w $TEST_ROOT/store0 || true |