chiark / gitweb /
Dgit.pm: Improve symlink failure message
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Oct 2018 14:27:56 +0000 (15:27 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Oct 2018 14:29:10 +0000 (15:29 +0100)
Use fail rather than die, and print a newline.  This is used sometimes
to link origs etc.  Hopefully if this fails the user will know why.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm

index d2484f9423b7be4535ea22154db625b794660d10..fc146a3aebe0febd0ed589168860710c1cd84c6b 100644 (file)
@@ -422,7 +422,7 @@ sub link_ltarget ($$) {
     }
     my $r = link $old, $new;
     $r = symlink $old, $new if !$r && $!==EXDEV;
-    $r or die "(sym)link $old $new: $!";
+    $r or fail "(sym)link $old $new: $!\n";
 }
 
 sub hashfile ($) {