Merge pull request #1178 from dezgeg/bash-env-breakage-stable

nix-shell: Fix 'nix-shell --command' doing nothing without TTY (stable backport)
This commit is contained in:
Eelco Dolstra 2017-01-09 16:47:14 +01:00 committed by GitHub
commit 0085fc6d3e
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ my $runEnv = $0 =~ /nix-shell$/;
my $pure = 0;
my $fromArgs = 0;
my $packages = 0;
my $interactive = 1;
# Same condition as bash uses for interactive shells
my $interactive = -t STDIN && -t STDERR;
my @instArgs = ();
my @buildArgs = ();