--push-harness might be specified even though there is no git tree to
push to. In that situation, do not daftly not even push the logs.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
my $githost= $c{HarnessPublishGitUserHost};
my $gitdir= $c{HarnessPublishGitRepoDir};
- exit 0 if (!$githost || !$gitdir);
-
- eval {
+ if ($githost && $gitdir) {
+ eval {
system_checked("git push $githost:$gitdir HEAD:refs/heads/flight-$flight");
system_checked("ssh $githost 'cd $gitdir && git update-server-info'");
- };
- if ($@) {
- $push_harness eq '--push-harness-try' or die;
- warn;
+ };
+ if ($@) {
+ $push_harness eq '--push-harness-try' or die;
+ warn;
+ }
}
}