1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

nix-shell: In #! mode, pass the last argument

"i < argc - 1" should be "i < argc".
This commit is contained in:
Eelco Dolstra 2017-01-03 11:40:51 +01:00
parent ae1e4dfad2
commit c287e797a8
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 14 additions and 16 deletions

View file

@ -17,5 +17,5 @@ output=$(NIX_PATH=nixpkgs=shell.nix nix-shell --pure -p foo bar --run 'echo "$(f
sed -e "s|@ENV_PROG@|$(type -p env)|" shell.shebang.sh > $TEST_ROOT/shell.shebang.sh
chmod a+rx $TEST_ROOT/shell.shebang.sh
output=$($TEST_ROOT/shell.shebang.sh)
[ "$output" = "foo bar" ]
output=$($TEST_ROOT/shell.shebang.sh abc def)
[ "$output" = "foo bar abc def" ]