mirror of
https://github.com/NixOS/nix
synced 2025-07-08 19:23:54 +02:00
Escape filename given to nix-shell in shebang mode
This prevents spaces or other metacharacters from causing nix-shell to execute the wrong path. Fixes #4229.
This commit is contained in:
parent
605bacdc92
commit
437189e446
3 changed files with 20 additions and 4 deletions
|
@ -50,7 +50,7 @@ let pkgs = rec {
|
|||
# ruby "interpreter" that outputs "$@"
|
||||
ruby = runCommand "ruby" {} ''
|
||||
mkdir -p $out/bin
|
||||
echo 'printf -- "$*"' > $out/bin/ruby
|
||||
echo 'printf %s "$*"' > $out/bin/ruby
|
||||
chmod a+rx $out/bin/ruby
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue