aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2018-04-07 22:38:45 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2018-04-07 22:38:45 -0400
commit399f43c3d5fe91db3a2d6968d8ec30a4d6fbf285 (patch)
tree7424574b32c4c0636bbe049f9080c2d4394b0e33 /src/nix-build
parentb828051659cf7cac21577982afd3f9314dc2e68c (diff)
nix-shell: Fixes use with ruby shebangs.
The ported code in 80ebc553eca19dafc64c47420cd49ddd506bc9b7 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.
Diffstat (limited to 'src/nix-build')
-rwxr-xr-xsrc/nix-build/nix-build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index cf628519c..a63b3e07a 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -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();
}