diff --git a/modules/ksb/Updater/Git.pm b/modules/ksb/Updater/Git.pm index 970f3ff..2efd5fc 100644 --- a/modules/ksb/Updater/Git.pm +++ b/modules/ksb/Updater/Git.pm @@ -86,6 +86,7 @@ sub clone if ((my $e = had_an_exception()) || !$result) { warning($e->message()) if $e; note ("\tFalling back to clone of $module"); + p_chdir($srcdir); if (0 != log_command($module, 'git-clone', ['git', 'clone', @args])) { croak_runtime("Failed to make initial clone of $module"); } @@ -96,8 +97,6 @@ sub clone my ($commitId, $commitType) = $self->_determinePreferredCheckoutSource($module); - p_chdir($srcdir); - # Switch immediately to user-requested tag or branch now. if ($commitType eq 'tag') { info ("\tSwitching to specific commit g[$commitId]");