Skip to content

Commit ca5e4d4

Browse files
committed
Fix download of repo in *-from-pr
Adapt for `extract_dir` now returning the subfolder which it previously did not because the downloaded tar file is in the same folder.
1 parent 6b9b9d3 commit ca5e4d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

easybuild/tools/github.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,10 @@ def download_repo(repo=GITHUB_EASYCONFIGS_REPO, branch=None, commit=None, accoun
429429
else:
430430
_log.debug("%s downloaded to %s, extracting now", base_name, path)
431431

432-
base_dir = extract_file(target_path, path, forced=True, change_into_dir=False, trace=False)
433-
extracted_path = os.path.join(base_dir, extracted_dir_name)
432+
extracted_path = extract_file(target_path, path, forced=True, change_into_dir=False, trace=False)
433+
if extracted_path != expected_path:
434+
raise EasyBuildError(f"Unexpected directory '{extracted_path} for extracted repo. Expected: {expected_path}",
435+
exit_code=EasyBuildExit.FAIL_EXTRACT)
434436

435437
# check if extracted_path exists
436438
if not os.path.isdir(extracted_path):

0 commit comments

Comments
 (0)