From: Sven Verdoolaege Date: Mon, 4 Jul 2005 15:36:25 +0000 (+0200) Subject: git-cvsimport-script: more error handling X-Git-Tag: v0.99~71^2^2^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=175011320690864d1483e7eec19da7f71d14dad7;p=git.git git-cvsimport-script: more error handling --- diff --git a/git-cvsimport-script b/git-cvsimport-script index 9773891b..7f93fb3c 100755 --- a/git-cvsimport-script +++ b/git-cvsimport-script @@ -408,6 +408,7 @@ unless(-d $git_dir) { # populate index system('git-read-tree', $last_branch); + die "read-tree failed: $?\n" if $?; # Get the last import timestamps opendir(D,"$git_dir/refs/heads"); @@ -510,8 +511,8 @@ my $commit = sub { print "Parent ID $parent\n" if $opt_v; } - my $pr = IO::Pipe->new(); - my $pw = IO::Pipe->new(); + my $pr = IO::Pipe->new() or die "Cannot open pipe: $!\n"; + my $pw = IO::Pipe->new() or die "Cannot open pipe: $!\n"; $pid = fork(); die "Fork: $!\n" unless defined $pid; unless($pid) {