Skip to content

Commit

Permalink
Fix path variable change. Add better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKahr committed Nov 23, 2023
1 parent 91ab33e commit 231e597
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dist/platforms/ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ dbus-uuidgen > /etc/machine-id && mkdir -p /var/lib/dbus/ && ln -sf /etc/machine
# We do this here to ensure it has root permissions
#

fullProjectPath="$GITHUB_WORKSPACE/$PROJECT_PATH"

if [[ "$BUILD_TARGET" == "Android" ]]; then
export JAVA_HOME="$(awk -F'=' '/JAVA_HOME=/{print $2}' /usr/bin/unity-editor.d/*)"
ANDROID_HOME_DIRECTORY="$(awk -F'=' '/ANDROID_HOME=/{print $2}' /usr/bin/unity-editor.d/*)"
Expand Down Expand Up @@ -38,11 +40,11 @@ else
fi

if [[ "RUN_AS_HOST_USER" == "true" ]]; then
echo "Running as host user"

# Stop on error if we can't set up the user
set -e

fullProjectPath="$GITHUB_WORKSPACE/$PROJECT_PATH"

# Get host user/group info so we create files with the correct ownership
USERNAME=$(stat -c '%U' "$fullProjectPath")
USERID=$(stat -c '%u' "$fullProjectPath")
Expand All @@ -65,6 +67,8 @@ if [[ "RUN_AS_HOST_USER" == "true" ]]; then
# Switch to the host user so we can create files with the correct ownership
su $USERNAME -c "$SHELL -c 'source /steps/runsteps.sh'"
else
echo "Running as root"

# Run as root
source /steps/runsteps.sh
fi
Expand Down

0 comments on commit 231e597

Please sign in to comment.