summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--scripts/nix-build.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index fab8fae84e..1357b7a129 100644
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -110,9 +110,9 @@ foreach my $expr (@exprs) {
 
     # Instantiate.
     my @drvPaths;
-    open DRVPATHS, "-|", "@bindir@/nix-instantiate", "--add-root", $drvLink, "--indirect", @instArgs, $expr;
+    my $pid = open DRVPATHS, "-|", "@bindir@/nix-instantiate", "--add-root", $drvLink, "--indirect", @instArgs, $expr;
     while (<DRVPATHS>) {chomp; push @drvPaths, $_;}
-    close DRVPATHS;
+    close DRVPATHS or die;
 
     foreach my $drvPath (@drvPaths) {
         my $target = readlink $drvPath;