We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1301bcb + 3685f0e commit c89945dCopy full SHA for c89945d
easybuild/tools/containers/singularity.py
@@ -94,8 +94,9 @@
94
}
95
EOF
96
97
-# change to 'easybuild' user
98
-su - easybuild
+# switch to 'easybuild' user for following commands
+# quotes around EOF delimiter are important to ensure environment variables are not expanded prematurely!
99
+su - easybuild << 'EOF'
100
101
# verbose commands, exit on first error
102
set -ve
@@ -122,8 +123,8 @@
122
123
mkdir -p /app/lmodcache
124
$LMOD_DIR/update_lmod_system_cache_files -d /app/lmodcache -t /app/lmodcache/timestamp /app/modules/all
125
-# exit from 'easybuild' user
126
-exit
+# end of set of commands to run as 'easybuild' user
127
+EOF
128
129
# cleanup, everything in /scratch is assumed to be temporary
130
rm -rf /scratch/*
0 commit comments