Skip to content

Commit dd28095

Browse files
committed
add support for extended_dry_run mode to filetools.make_archive()
1 parent 87b733a commit dd28095

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

easybuild/tools/filetools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,6 +2819,11 @@ def reproducible_filter(tarinfo):
28192819
archive_filename = archive_name + archive_ext
28202820
archive_path = archive_filename if archive_dir is None else os.path.join(archive_dir, archive_filename)
28212821

2822+
if build_option('extended_dry_run'):
2823+
# early return in dry run mode
2824+
dry_run_msg("Archiving '%s' into '%s'...", dir_path, archive_path)
2825+
return archive_path
2826+
28222827
# TODO: replace with TarFile.add(recursive=True) when support for Python 3.6 drops
28232828
# since Python v3.7 tarfile automatically orders the list of files added to the archive
28242829
dir_files = [dir_path]

0 commit comments

Comments
 (0)