From e331d7c8bbe5afe9d0b621bb8107789bcd481e50 Mon Sep 17 00:00:00 2001
From: Lukas Werner <lks.werner@fau.de>
Date: Wed, 4 Aug 2021 17:19:18 +0200
Subject: [PATCH] Fixed usage of module

---
 runner_scripts/root/run.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runner_scripts/root/run.sh b/runner_scripts/root/run.sh
index 6dccef4..50e7690 100755
--- a/runner_scripts/root/run.sh
+++ b/runner_scripts/root/run.sh
@@ -104,7 +104,7 @@ if [[ ("$2" == "step_script" || "$2" == "build_script") && "${CUSTOM_ENV_NO_SLUR
     done
     runuser --login "$AUTH_USER" --command "cp $1 $BASE_DIR.tmp/$CUSTOM_ENV_CI_JOB_ID.sh"
 
-    echo "#!/bin/bash" > "$TMPDIR"/salloc.sh
+    echo "#!/bin/bash -l" > "$TMPDIR"/salloc.sh
     echo "salloc --quiet --chdir \"$BASE_DIR\" ${SALLOC_OPTIONS[@]} \
         srun --cpu-bind none --wait 0 --kill-on-bad-exit=1 \
         \"$AUTH_USER_SHELL\" --login \"$BASE_DIR.tmp/$CUSTOM_ENV_CI_JOB_ID.sh\"" >> "$TMPDIR"/salloc.sh
@@ -116,6 +116,6 @@ if [[ ("$2" == "step_script" || "$2" == "build_script") && "${CUSTOM_ENV_NO_SLUR
     #    srun --cpu-bind none --wait 0 --kill-on-bad-exit=1 \
     #    \"$AUTH_USER_SHELL\" --login \"$BASE_DIR.tmp/$CUSTOM_ENV_CI_JOB_ID.sh\""
 else
-    runuser --login "$AUTH_USER" --command "cd \"$BASE_DIR\"; $1"
+    runuser --login "$AUTH_USER" --command "cd \"$BASE_DIR\"; bash -l $1"
 fi
 
-- 
GitLab