chiark / gitweb /
Print better error message (with `fail' rather than `die') if `dgit clone' cannot...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 May 2016 14:28:18 +0000 (15:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Jul 2016 21:37:38 +0000 (22:37 +0100)
debian/changelog
dgit

index 4c9e290786e5a720d8b9d2e00845ade8f0103190..1309610a814c865761edcbc337f8b606b7f28de0 100644 (file)
@@ -12,6 +12,8 @@ dgit (1.5~~) unstable; urgency=medium
     directory before running rmtree on it.  Closes:#796773.
   * Do not call "warn" on failure of cleanup handler in END block
     (since warn has been made fatal and aborts the cleanup chain).
     directory before running rmtree on it.  Closes:#796773.
   * Do not call "warn" on failure of cleanup handler in END block
     (since warn has been made fatal and aborts the cleanup chain).
+  * Print better error message (with `fail' rather than `die') if
+    `dgit clone' cannot create the destination directory.
 
   Test suite:
   * When sbuild fails, do not crash due to sed not finding the log
 
   Test suite:
   * When sbuild fails, do not crash due to sed not finding the log
diff --git a/dgit b/dgit
index 507be273f3f0b4c5b4debb44de0c060e62eaeb53..9bdd2074b520d33ce14234d4e50e53971d4ebb27 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1706,7 +1706,7 @@ sub clone ($) {
     canonicalise_suite();
     badusage "dry run makes no sense with clone" unless act_local();
     my $hasgit = check_for_git();
     canonicalise_suite();
     badusage "dry run makes no sense with clone" unless act_local();
     my $hasgit = check_for_git();
-    mkdir $dstdir or die "$dstdir $!";
+    mkdir $dstdir or fail "create \`$dstdir': $!";
     changedir $dstdir;
     runcmd @git, qw(init -q);
     my $giturl = access_giturl(1);
     changedir $dstdir;
     runcmd @git, qw(init -q);
     my $giturl = access_giturl(1);