about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2017-01-03T07·59+0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-01-03T08·11+0200
commit018f884ffd834ee339e9b4182b4537a3cd80ee28 (patch)
tree72df708125126ff1dcc024cd941b9a045133dd9f /src
parentc698ec1f220f9be4c4184532f0a6c2a9370f3839 (diff)
nix-shell: Don't act interactive in shebangs
I had observed that 'bash --rcfile' would do nothing in a
non-interactive context and cause nothing to be executed if a script
using nix-shell shebangs were run in a non-interactive context.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/nix-build/nix-build.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 4d86f394bc92..ef959fa00938 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -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 = "";