Commit 9fbac59e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor changes to error handling.

parent f7e53243
......@@ -153,9 +153,7 @@ sub Clone()
if (system("$GIT cat-file -e refs/heads/master:profile.py") &&
system("$GIT cat-file -e refs/heads/master:profile.rspec")) {
chdir("$REPODIR");
system("/bin/rm -rf $REPODIR/$reponame");
fatal("No geni-lib script or rspec in this repository");
print STDERR "No geni-lib script or rspec in this repository\n";
}
return 0;
}
......@@ -192,7 +190,7 @@ sub Update()
}
if (system("$GIT cat-file -e refs/heads/master:profile.py") &&
system("$GIT cat-file -e refs/heads/master:profile.rspec")) {
fatal("No geni-lib script or rspec in this repository");
print STDERR "No geni-lib script or rspec in this repository\n";
}
return 0;
}
......
......@@ -365,9 +365,7 @@ if (exists($new_args{'repourl'})) {
my $output =
emutil::ExecQuiet("$MANAGEGITREPO clone -n $reponame '$repourl'");
if ($?) {
print STDERR $output;
$errors{"error"} = $output;
UserError();
UserError($output);
}
$new_args{'reponame'} = $reponame;
}
......@@ -376,9 +374,7 @@ if (exists($new_args{'repourl'})) {
#
my $output = emutil::ExecQuiet("$MANAGEGITREPO hash -n $reponame");
if ($?) {
print STDERR $output;
$errors{"error"} = $output;
UserError();
UserError($output);
}
$repohash = $output;
chomp($repohash);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment