From 1fb30e6d50c29adcc3a3d73381cd90f5f5989c31 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 Apr 2012 13:52:37 +0200 Subject: [PATCH] Handle the case where $SHELL is not set --- scripts/nix-build.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 14ee1141e..35b186bb7 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -14,7 +14,8 @@ my @instArgs = (); my @buildArgs = (); my @exprs = (); -my $envCommand = "p=\$PATH; source \$stdenv/setup; PATH=\$PATH:\$p; exec $ENV{SHELL}"; +my $shell = $ENV{SHELL} || "/bin/sh"; +my $envCommand = "p=\$PATH; source \$stdenv/setup; PATH=\$PATH:\$p; exec $shell"; my @envExclude = ();