diff options
author | AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> | 2025-07-10 10:27:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-10 10:27:16 -0700 |
commit | db5af314b9054be7c4c021643d43852bf06cef6d (patch) | |
tree | f4df5b676242c8045f8f56ae1d4b6c23cfb84c3c | |
parent | c70875e0ba93151a19c7b48e3d66dfe9ed556171 (diff) |
Remove previously installed viewer
More permission issues encountered if a job is repeated. That is, when attempting to replace an existing installed viewer.
-rw-r--r-- | .github/workflows/qatest.yaml | 14 |
1 files changed, 11 insertions, 3 deletions
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 |