diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-18 14:51:25 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-18 14:51:25 +0200 |
commit | 4f4a14453ae8dbfc24a1e580aa695165e9d81f0a (patch) | |
tree | 593df0e0ae4ef94f0cd3e34f97e4eba10497b774 /scripts | |
parent | 4ea034a5c56a60ae0ceedf18a066c428a963c836 (diff) |
Don't set $PS1 in non-interactive shells
Shouldn't really matter, but you never know.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/nix-build.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 4bf85ae13..8ac95e90e 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -209,7 +209,7 @@ foreach my $expr (@exprs) { '[ -e $stdenv/setup ] && source $stdenv/setup; ' . ($pure ? '' : 'PATH=$PATH:$p; ') . 'set +e; ' . - 'PS1="\n\[\033[1;32m\][nix-shell:\w]$\[\033[0m\] "; ' . + '[ -n "$PS1" ] && PS1="\n\[\033[1;32m\][nix-shell:\w]$\[\033[0m\] "; ' . 'unset NIX_ENFORCE_PURITY; ' . 'shopt -u nullglob; ' . $envCommand); |