Skip to content

Commit 28c484a

Browse files
committed
Fix typo and redirect
modules -> module checking the command would print the name, this was intended to be a silent check -< redirect to /dev/null
1 parent d946dcb commit 28c484a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

runxtb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,13 @@ load_xtb_modules ()
370370
# Fail if there are no modules given (don't make any assumptions).
371371
(( ${#load_modules[*]} == 0 )) && fatal "No modules to load."
372372
# Fail if the module command is not available.
373-
( command -v module 2>&1 ) || fatal "Command 'module' not available."
373+
( command -v module &> /dev/null ) || fatal "Command 'module' not available."
374374
# Since commited to only supporting proper module systems, failing to load
375375
# a module will produce an exit status > 0. This will be trapped and the script
376376
# will exit. (On the rwth cluster it is 'Lmod' - good choice.)
377377
# To be on the safe side, there should be the option to purge modules.
378378
if [[ "$purge_modules" =~ ^[Tt]([Rr]([Uu]([Ee])?)?)?$ ]] ; then
379-
modules purge &> >(debug_trace) || fatal "Failed to purge modules."
379+
module purge &> >(debug_trace) || fatal "Failed to purge modules."
380380
fi
381381
# Load the modules sequentially:
382382
local mod

0 commit comments

Comments
 (0)