mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
nix-shell: Fixes use with ruby shebangs.
The ported code in 80ebc553ec
was incorrectly ported.
```
- $envCommand = "exec $execArgs $interpreter -e 'load(\"$script\")' -- ${\(join ' ', (map shellEscape, @savedArgs))}";
...
+ envCommand = (format("exec %1% %2% -e 'load(\"%3%\") -- %4%") % execArgs % interpreter % script % joined.str()).str();
```
The single-quote finishing the small ruby snippet was lost in
translation.
This commit is contained in:
parent
b828051659
commit
399f43c3d5
@ -212,7 +212,7 @@ void mainWrapped(int argc, char * * argv)
|
||||
// read the shebang to understand which packages to read from. Since
|
||||
// this is handled via nix-shell -p, we wrap our ruby script execution
|
||||
// in ruby -e 'load' which ignores the shebangs.
|
||||
envCommand = (format("exec %1% %2% -e 'load(\"%3%\") -- %4%") % execArgs % interpreter % script % joined.str()).str();
|
||||
envCommand = (format("exec %1% %2% -e 'load(\"%3%\")' -- %4%") % execArgs % interpreter % script % joined.str()).str();
|
||||
} else {
|
||||
envCommand = (format("exec %1% %2% %3% %4%") % execArgs % interpreter % script % joined.str()).str();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user