Repository navigation
Keep CLI options set in code out of the saved options asset - #2927
Open
bitsandfoxes wants to merge 2 commits into
Open
bitsandfoxes wants to merge 2 commits into
bitsandfoxes wants to merge 2 commits into
Conversation
bitsandfoxes
force-pushed
the
fix/cli-options-configure-copy
branch
from
November 4, 2026 15:47
12c2c93 to
3cf5b98
Compare
bitsandfoxes
changed the base branch from
main
to
test/skip-android-2021-throw-frame
November 4, 2026 15:58
bitsandfoxes
requested review from
a team,
jpnurmi,
limbonaut and
tustanivsky
November 4, 2026 15:59
bitsandfoxes
marked this pull request as ready for review
November 4, 2026 15:59
tustanivsky
approved these changes
Nov 4, 2026
jpnurmi
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
SentryCliOptionsConfigurationcan set CLI options in code during a build, for example an auth token read fromSENTRY_AUTH_TOKENso it never lands in the project.SentryScriptableObject.LoadCliOptionsranConfigureon the loadedSentryCliOptionsasset itself. That is the same instance the Sentry window edits, and the window marks it dirty and saves it when it loses focus, so the token set in code got written intoSentryCliOptions.assetand could end up committed.LoadCliOptionsnow runs the configuration on a copy of the asset (Object.Instantiate) and returns the copy. The iOS, Android and native build post-processors only read the returned options, so they get the configured values as before, and the asset on disk keeps only what was set in the window.An asset that already holds a token saved this way keeps it; remove it in the window or the asset file.
Test:
LoadCliOptions_ConfigurationSetsAuth_DoesNotChangeSavedAssetinSentryScriptableObjectTestschecks that the returned options carry the configured auth token and that the asset doesn't. It fails without the fix.🤖 Generated with Claude Code