Skip to content

Commit 1b74cbf

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 e7c6dee commit 1b74cbf

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
@@ -430,8 +430,10 @@ def download_repo(repo=GITHUB_EASYCONFIGS_REPO, branch=None, commit=None, accoun
430430
else:
431431
_log.debug("%s downloaded to %s, extracting now", base_name, path)
432432

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

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

0 commit comments

Comments
 (0)