about summary refs log tree commit diff
path: root/corepkgs/nar
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-11-08T11·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-11-08T11·32+0000
commitd6db574ec127757c05c24f53c71e4116caaa762b (patch)
tree76f5aad1f8da79dbedff4cbd2081360a7f622bb9 /corepkgs/nar
parentb8aaef5e4e25daa838157c7b3a8165b633901646 (diff)
* Check exit status of pipe elements.
Diffstat (limited to 'corepkgs/nar')
-rw-r--r--corepkgs/nar/nar.sh.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in
index 9635d29f4f74..11344f7fffbd 100644
--- a/corepkgs/nar/nar.sh.in
+++ b/corepkgs/nar/nar.sh.in
@@ -8,6 +8,8 @@ mkdir $out
 dst=$out/$(basename $path).nar.bz2
 @bindir@/nix-store --dump "$path" | @bzip2@ > $dst
 
+if test "${PIPESTATUS[0]}" != "0"; then exit 1; fi
+
 md5=$(md5sum -b $dst | cut -c1-32)
 if test $? != 0; then exit 1; fi
 echo $md5 > $out/md5