Skip to content

Commit

Permalink
fix copy options json only if destination set and file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Jan 22, 2025
1 parent dcfdc6c commit 7eb1786
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/core/scripts/sentry-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ if [ "$SENTRY_COPY_OPTIONS_FILE" = true ]; then
echo "[Sentry] CONFIGURATION_BUILD_DIR is not set. $SENTRY_OPTIONS_FILE_ERROR_MESSAGE_POSTFIX" 1>&2
elif [[ -z "$UNLOCALIZED_RESOURCES_FOLDER_PATH" ]]; then
echo "[Sentry] UNLOCALIZED_RESOURCES_FOLDER_PATH is not set. $SENTRY_OPTIONS_FILE_ERROR_MESSAGE_POSTFIX" 1>&2
fi

if [ -f "$SENTRY_OPTIONS_FILE_PATH" ]; then
elif [ ! -f "$SENTRY_OPTIONS_FILE_PATH" ]; then
echo "[Sentry] $SENTRY_OPTIONS_FILE_PATH not found. $SENTRY_OPTIONS_FILE_ERROR_MESSAGE_POSTFIX" 1>&2
else
cp "$SENTRY_OPTIONS_FILE_PATH" "$SENTRY_OPTIONS_FILE_DESTINATION_PATH"
echo "[Sentry] Copied $SENTRY_OPTIONS_FILE_PATH to $SENTRY_OPTIONS_FILE_DESTINATION_PATH"
else
echo "[Sentry] $SENTRY_OPTIONS_FILE_PATH not found. $SENTRY_OPTIONS_FILE_ERROR_MESSAGE_POSTFIX" 1>&2
fi
fi

0 comments on commit 7eb1786

Please sign in to comment.