Skip to content

Commit 1298585

Browse files
committed
Make sure to chdir back in perl 5 base class
1 parent afdb8b8 commit 1298585

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Perl6IRCBotable.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ sub to_full_commit {
7373

7474
my $old_dir = cwd();
7575
chdir RAKUDO;
76-
return if system('git', 'rev-parse', '--verify', $commit) != 0; # make sure that $commit is valid
76+
if (system('git', 'rev-parse', '--verify', $commit) != 0) { # make sure that $commit is valid
77+
chdir $old_dir;
78+
return;
79+
}
7780
my ($result, $exit_status, $exit_signal, $time) = $self->get_output('git', 'rev-list', '-1', $commit); # use rev-list to handle tags
7881
chdir $old_dir;
7982

0 commit comments

Comments
 (0)