Skip to content

Commit

Permalink
git-credential-netrc: fix exit status when tests fail
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Marsano <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
lmmarsano authored and gitster committed Jun 18, 2018
1 parent 04f673d commit 9347166
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/credential/netrc/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ BEGIN
# t-git-credential-netrc.sh kicks off our testing, so we have to go
# from there.
Test::More->builder->current_test(1);
Test::More->builder->no_ending(1);
}

my @global_credential_args = @ARGV;
Expand Down Expand Up @@ -103,6 +102,9 @@ BEGIN

ok(scalar keys %$cred == 2, 'Got keys decrypted by command option');

my $is_passing = eval { Test::More->is_passing };
exit($is_passing ? 0 : 1) unless $@ =~ /Can't locate object method/;

sub run_credential
{
my $args = shift @_;
Expand Down

0 comments on commit 9347166

Please sign in to comment.