From db5af314b9054be7c4c021643d43852bf06cef6d Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 10:27:16 -0700 Subject: Remove previously installed viewer More permission issues encountered if a job is repeated. That is, when attempting to replace an existing installed viewer. --- .github/workflows/qatest.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index ba2c0ed6d9..29d55c775f 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -511,12 +511,20 @@ jobs: exit 1 fi - # Use the default macOS installer to copy the .app to /Applications + APP_NAME=$(basename "$APP_PATH") + DEST_PATH="/Applications/$APP_NAME" + + # Remove existing installation if it exists to avoid permission conflicts + if [ -d "$DEST_PATH" ]; then + echo "Removing existing installation..." + sudo rm -rf "$DEST_PATH" + fi + + # Copy the .app to /Applications cp -R "$APP_PATH" /Applications/ # Verify the app was copied successfully - APP_NAME=$(basename "$APP_PATH") - if [ ! -d "/Applications/$APP_NAME" ]; then + if [ ! -d "$DEST_PATH" ]; then echo "❌ Error: Failed to install application to /Applications!" exit 1 fi -- cgit v1.2.3