'gitolite mirror' needs to set exit code on push failure
This commit is contained in:
parent
2018267a45
commit
cd838411fa
|
@ -53,10 +53,11 @@ if ( $cmd eq 'push' ) {
|
||||||
|
|
||||||
my $errors = 0;
|
my $errors = 0;
|
||||||
for (`git push --mirror $host:$repo 2>&1`) {
|
for (`git push --mirror $host:$repo 2>&1`) {
|
||||||
|
$errors = 1 if $?;
|
||||||
print STDERR "$_" if -t STDERR or exists $ENV{GL_USER};
|
print STDERR "$_" if -t STDERR or exists $ENV{GL_USER};
|
||||||
chomp;
|
chomp;
|
||||||
if (/FATAL/) {
|
if (/FATAL/) {
|
||||||
$errors++;
|
$errors = 1;
|
||||||
gl_log( 'mirror', $_ );
|
gl_log( 'mirror', $_ );
|
||||||
} else {
|
} else {
|
||||||
trace( 1, "mirror: $_" );
|
trace( 1, "mirror: $_" );
|
||||||
|
|
Loading…
Reference in a new issue