Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/scripts/sentry-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ if [ "$SENTRY_DISABLE_AUTO_UPLOAD" != true ]; then
echo "$SENTRY_XCODE_COMMAND_OUTPUT" | awk '{print "output: sentry-cli - " $0}'
else
if [ "$SENTRY_ALLOW_FAILURE" == true ]; then
echo "$SENTRY_XCODE_COMMAND_OUTPUT" | awk '{print "warning: sentry-cli - " $0}'
echo "warning: sentry-cli - Source maps upload failed, but continuing build because SENTRY_ALLOW_FAILURE=true"
echo "warning: sentry-cli - $SENTRY_XCODE_COMMAND_OUTPUT"
else
echo "$SENTRY_XCODE_COMMAND_OUTPUT" | awk '{print "error: sentry-cli - " $0}'
echo "error: sentry-cli - To disable source maps auto upload, set SENTRY_DISABLE_AUTO_UPLOAD=true in your environment variables. Or to allow failing upload, set SENTRY_ALLOW_FAILURE=true"
echo "error: sentry-cli - $SENTRY_XCODE_COMMAND_OUTPUT"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo may swallow bundler output

Medium Severity

Using echo "$SENTRY_XCODE_COMMAND_OUTPUT" | awk ... can misprint or suppress output when the captured output begins with -n/-e (option-like prefixes) because echo option parsing is shell-dependent. This can hide the underlying Metro/sentry-cli failure again, especially on the error path where visibility is most important.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct in theory but this pattern is already used (see line 57 above)

exitCode=1
fi
fi
Expand Down
Loading