about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/nix-build.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index ef86cb97b7ce..381dbd5e266c 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -274,7 +274,7 @@ foreach my $expr (@exprs) {
     while (<OUTPATHS>) {chomp; push @outPaths, $_;}
     if (!close OUTPATHS) {
         die "nix-store killed by signal " . ($? & 127) . "\n" if ($? & 127);
-        exit 1;
+        exit $? >> 8 || 1;
     }
 
     next if $dryRun;