* Better error checking.
This commit is contained in:
		
							parent
							
								
									7eaf038763
								
							
						
					
					
						commit
						ebe342c9c1
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -194,6 +194,7 @@ sub downloadFile {
 | 
				
			||||||
    $ENV{"QUIET"} = 1;
 | 
					    $ENV{"QUIET"} = 1;
 | 
				
			||||||
    $ENV{"NIX_HASH_ALGO"} = $hashAlgo;
 | 
					    $ENV{"NIX_HASH_ALGO"} = $hashAlgo;
 | 
				
			||||||
    my ($hash2, $path) = `@bindir@/nix-prefetch-url '$url' '$hash'`;
 | 
					    my ($hash2, $path) = `@bindir@/nix-prefetch-url '$url' '$hash'`;
 | 
				
			||||||
 | 
					    die "download of `$url' failed" unless $? == 0;
 | 
				
			||||||
    chomp $hash2;
 | 
					    chomp $hash2;
 | 
				
			||||||
    chomp $path;
 | 
					    chomp $path;
 | 
				
			||||||
    die "hash mismatch, expected $hash, got $hash2" if $hash ne $hash2;
 | 
					    die "hash mismatch, expected $hash, got $hash2" if $hash ne $hash2;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue