From 4f4a14453ae8dbfc24a1e580aa695165e9d81f0a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 18 Oct 2013 14:51:25 +0200 Subject: [PATCH] Don't set $PS1 in non-interactive shells Shouldn't really matter, but you never know. --- scripts/nix-build.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);