diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2017-01-09T15·44+0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09T15·44+0100 |
commit | f61337fdb36fa7107b015d57eff399553e69e9a3 (patch) | |
tree | 51952fc35d2150fff30e41a7f10df6ab060565b4 /src/nix-build/nix-build.cc | |
parent | 9000150a784d05a76455886b1ad8a95e0cff2115 (diff) | |
parent | 3890de049dff68b85ddb1e21c91e16561bc668ce (diff) |
Merge pull request #1177 from dezgeg/bash-env-breakage
nix-shell: Fix 'nix-shell --command' doing nothing without TTY
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-x | src/nix-build/nix-build.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index c67148728722..71ef5af86af9 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -81,7 +81,8 @@ int main(int argc, char ** argv) auto pure = false; auto fromArgs = false; auto packages = false; - auto interactive = true; + // Same condition as bash uses for interactive shells + auto interactive = isatty(STDIN_FILENO) && isatty(STDERR_FILENO); Strings instArgs; Strings buildArgs; |