about summary refs log tree commit diff
path: root/src/nix-build/nix-build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2017-01-03T09·08+0100
committerGitHub <noreply@github.com>2017-01-03T09·08+0100
commitae1e4dfad29e24739c7f280b1a96e16ba1b54d3a (patch)
treed25d160845444d86417c593c4309ccbdc59e2e55 /src/nix-build/nix-build.cc
parentb6b142b4b10552f2a2a8c904487bbd196d35a5c1 (diff)
parentb501bea25fac9c43dfd0d197e16836facd2b63a5 (diff)
Merge pull request #1169 from dezgeg/fix-shell-shebang
Fix nix-shell shebang usage
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-xsrc/nix-build/nix-build.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 08c6793577a4..ef959fa00938 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -117,7 +117,7 @@ int main(int argc, char ** argv)
                     inShebang = true;
                     for (int i = 2; i < argc - 1; ++i)
                         savedArgs.push_back(argv[i]);
-                    std::vector<string> args;
+                    args.clear();
                     for (auto line : lines) {
                         line = chomp(line);
                         std::smatch match;
@@ -276,6 +276,7 @@ int main(int argc, char ** argv)
                 if (n >= args.size()) {
                     throw UsageError(format("%1% requires an argument") % arg);
                 }
+                interactive = false;
                 auto interpreter = args[n];
                 auto execArgs = "";