From 231e59731842bb78878aee0a4a93130eef1931d6 Mon Sep 17 00:00:00 2001 From: Andrew Kahr <22359829+AndrewKahr@users.noreply.github.com> Date: Thu, 23 Nov 2023 02:28:12 -0800 Subject: [PATCH] Fix path variable change. Add better logging --- dist/platforms/ubuntu/entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/platforms/ubuntu/entrypoint.sh b/dist/platforms/ubuntu/entrypoint.sh index 9934343d..bb3fc489 100755 --- a/dist/platforms/ubuntu/entrypoint.sh +++ b/dist/platforms/ubuntu/entrypoint.sh @@ -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/*)" @@ -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") @@ -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