git: Ensure in right srcdir if a fallback to git-clone happens.

This apparently worked accidentally in most cases but it doesn't
interact well with options like 'remove-after-install' from previous
module builds.
wilder
Michael Pyne 9 years ago
parent fcc73848de
commit 74924a888f
  1. 3
      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]");

Loading…
Cancel
Save