Skip to content

Commit 9347166

Browse files
lmmarsanogitster
authored andcommitted
git-credential-netrc: fix exit status when tests fail
Signed-off-by: Luis Marsano <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 04f673d commit 9347166

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/credential/netrc/test.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ BEGIN
1111
# t-git-credential-netrc.sh kicks off our testing, so we have to go
1212
# from there.
1313
Test::More->builder->current_test(1);
14-
Test::More->builder->no_ending(1);
1514
}
1615

1716
my @global_credential_args = @ARGV;
@@ -103,6 +102,9 @@ BEGIN
103102

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

105+
my $is_passing = eval { Test::More->is_passing };
106+
exit($is_passing ? 0 : 1) unless $@ =~ /Can't locate object method/;
107+
106108
sub run_credential
107109
{
108110
my $args = shift @_;

0 commit comments

Comments
 (0)