Skip to content

Commit cd805e2

Browse files
committed
Make fetching source tarball by git commit more robust
1 parent c1b05d9 commit cd805e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

easybuild/tools/filetools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,6 +2761,8 @@ def get_source_tarball_from_git(filename, target_dir, git_config):
27612761
# if a specific commit is asked for, check it out
27622762
if commit:
27632763
checkout_cmd.append(f"{commit}")
2764+
# The commit might not be reachable from the default branch that is fetched, so fetch it explicitely
2765+
run_shell_cmd(f'{git_cmd} {fetch} {repo_url}', hidden=True, verbose_dry_run=True, work_dir=tmpdir)
27642766
elif tag:
27652767
checkout_cmd.append(f"refs/tags/{tag}")
27662768

0 commit comments

Comments
 (0)