Skip to content

Commit

Permalink
Merge pull request #4721 from branfosj/extended_dry_run
Browse files Browse the repository at this point in the history
make sure `type module` is run during a dry run
  • Loading branch information
boegel authored Dec 11, 2024
2 parents 5e01424 + acd1cda commit 1de2441
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/end2end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
"eb --show-system-info"
"eb --check-eb-deps"
"eb --show-config"
"eb -x bzip2-1.0.8.eb"
)
for cmd in "${cmds[@]}"; do
echo ">>> $cmd"
Expand Down
4 changes: 2 additions & 2 deletions easybuild/tools/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def check_module_function(self, allow_mismatch=False, regex=None):
output, exit_code = None, EasyBuildExit.FAIL_SYSTEM_CHECK
else:
cmd = "type module"
res = run_shell_cmd(cmd, fail_on_error=False, in_dry_run=False, hidden=True, output_file=False)
res = run_shell_cmd(cmd, fail_on_error=False, in_dry_run=True, hidden=True, output_file=False)
output, exit_code = res.output, res.exit_code

if regex is None:
Expand Down Expand Up @@ -1367,7 +1367,7 @@ def check_module_function(self, allow_mismatch=False, regex=None):
out, ec = None, 1
else:
cmd = "type _module_raw"
res = run_shell_cmd(cmd, fail_on_error=False, in_dry_run=False, hidden=True, output_file=False)
res = run_shell_cmd(cmd, fail_on_error=False, in_dry_run=True, hidden=True, output_file=False)
out, ec = res.output, res.exit_code

if regex is None:
Expand Down

0 comments on commit 1de2441

Please sign in to comment.