Skip to content

Commit 82ab5ec

Browse files
committed
Dump command env for module commands in debug mode
1 parent ac0da71 commit 82ab5ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

easybuild/tools/modules.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,12 +1259,13 @@ def run_module(self, *args, **kwargs):
12591259
self.log.debug("Changing %s from '%s' to '%s' in environment for module command",
12601260
key, old_value, new_value)
12611261

1262-
log_output = build_option('debug_module_cmds') and not kwargs.get('hide_output', False)
1262+
debug_module_cmds = build_option('debug_module_cmds')
1263+
log_output = debug_module_cmds and not kwargs.get('hide_output', False)
12631264
cmd_list = self.compose_cmd_list(args)
12641265
cmd = ' '.join(cmd_list)
12651266
# note: module commands are always run in dry mode, and are kept hidden in trace and dry run output
12661267
res = run_shell_cmd(cmd_list, env=environ, fail_on_error=False, use_bash=False, split_stderr=True,
1267-
hidden=True, in_dry_run=True, output_file=False,
1268+
hidden=True, in_dry_run=True, output_file=debug_module_cmds,
12681269
log_output_on_success=log_output)
12691270

12701271
# stdout will contain python code (to change environment etc)

0 commit comments

Comments
 (0)