Skip to content

Commit c866662

Browse files
committed
Pass modtool=None for --fetch
Avoids failure with modules-env due to having no $MODULEPATH but an (otherwise inexistant) modules tool
1 parent 7a5b63f commit c866662

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/framework/utilities.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,13 @@ def eb_main(self, args, do_build=False, return_error=False, logfile=None, verbos
295295
env_before = copy.deepcopy(os.environ)
296296

297297
try:
298-
main(args=args, logfile=logfile, do_build=do_build, testing=testing, modtool=self.modtool)
298+
if '--fetch' in args:
299+
# The config sets modules_tool to None if --fetch is specified,
300+
# so do the same here to keep the behavior consistent
301+
modtool = None
302+
else:
303+
modtool = self.modtool
304+
main(args=args, logfile=logfile, do_build=do_build, testing=testing, modtool=modtool)
299305
except SystemExit as err:
300306
if raise_systemexit:
301307
raise err

0 commit comments

Comments
 (0)