Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure type module is run during a dry run (fixes use of eb -x) #4721

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading