Skip to content

Commit 227fc75

Browse files
committed
Only perform module purge when modules are specified
1 parent a9e3efb commit 227fc75

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/pavilion/test_run/test_run.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1148,12 +1148,13 @@ def _write_script(self, stype: str, path: Path, config: dict, module_wrappers: d
11481148

11491149
script.command(f'echo "(pav) Setting up {stype} environment."')
11501150

1151-
script.newline()
1152-
script.comment("Start with a fresh environment")
1153-
script.module_purge()
11541151

11551152
modules = config.get('modules', [])
11561153
if modules:
1154+
script.newline()
1155+
script.comment("Start with a fresh environment")
1156+
script.module_purge()
1157+
11571158
script.newline()
11581159
script.comment('Perform module related changes to the environment.')
11591160

0 commit comments

Comments
 (0)