Skip to content

Commit

Permalink
fix: cd into the correct dir before execution
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Feb 17, 2024
1 parent da611fd commit cec89d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions try
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ unset START_DIR SANDBOX_DIR UNION_HELPER DIRS_AND_MOUNTS TRY_EXIT_STATUS SOCKET
unset script_to_execute chroot_executable try_mount_log
mount -t proc proc /proc &&
cd "$START_DIR" &&
if [ $EUSER ]
then
su - $EUSER -c "sh $script_to_execute"
su - $EUSER -c "cd "$START_DIR" && sh $script_to_execute"
else
cd "$START_DIR" &&
. "$script_to_execute"
fi
EOF
Expand All @@ -242,7 +242,7 @@ EOF
# TZ: Does this adhere to the styleguide?
# TZ: TODO: un-export them later
SOCKET="$(mktemp -u)"
mkfifo $SOCKET
mkfifo "$SOCKET"
export SOCKET

# Running mapper in a subshell to suppress job control [1] + Done message
Expand Down

0 comments on commit cec89d3

Please sign in to comment.