Skip to content

Commit 3ca81d9

Browse files
author
Caspar van Leeuwen
committed
Merge branch 'fix_load_modules' into merge_pr908_pr910_pr911
2 parents 91de11e + b56c708 commit 3ca81d9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bot/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ mkdir -p ${SINGULARITY_TMPDIR}
115115

116116
# load modules if LOAD_MODULES is not empty
117117
if [[ ! -z ${LOAD_MODULES} ]]; then
118-
for mod in $(echo ${LOAD_MODULES} | tr ',' '\n')
118+
IFS=',' read -r -a modules <<< "$(echo "${LOAD_MODULES}")"
119+
for mod in "${modules[@]}";
119120
do
120121
echo "bot/build.sh: loading module '${mod}'"
121122
module load ${mod}

bot/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ mkdir -p ${SINGULARITY_TMPDIR}
135135

136136
# load modules if LOAD_MODULES is not empty
137137
if [[ ! -z ${LOAD_MODULES} ]]; then
138-
for mod in $(echo ${LOAD_MODULES} | tr ',' '\n')
138+
IFS=',' read -r -a modules <<< "$(echo "${LOAD_MODULES}")"
139+
for mod in "${modules[@]}";
139140
do
140141
echo "bot/test.sh: loading module '${mod}'"
141142
module load ${mod}

0 commit comments

Comments
 (0)