Check for failure when running wget
[ghc-hetmet.git] / darcs-all
index 69445d0..a80e6f8 100644 (file)
--- a/darcs-all
+++ b/darcs-all
@@ -118,6 +118,12 @@ sub download {
     my @cmd = ("wget", $from, "-O", $to);
     message "== running @cmd";
     system @cmd;
     my @cmd = ("wget", $from, "-O", $to);
     message "== running @cmd";
     system @cmd;
+    if ($? == -1) {
+        die "Failed to execute wget: $!\n";
+    }
+    elsif ($? != 0) {
+        die "wget failed: $?\n";
+    }
 }
 
 sub darcs {
 }
 
 sub darcs {