chiark / gitweb /
Print better error message (with `fail' rather than `die') if `dgit clone' cannot...
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 91f43af087372c02b0f6ad719f93a60b07a94002..9bdd2074b520d33ce14234d4e50e53971d4ebb27 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -155,7 +155,7 @@ END {
     local ($?);
     foreach my $f (@end) {
        eval { $f->(); };
-       warn "$us: cleanup: $@" if length $@;
+       print STDERR "$us: cleanup: $@" if length $@;
     }
 };
 
@@ -1706,7 +1706,7 @@ sub clone ($) {
     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);