Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: propagate the debug option to the cli#810

Merged
logaretm merged 2 commits into
mainfrom
awad/bundler-41-debug-likely-not-propagated-to-cli
Oct 10, 2025
Merged

fix: propagate the debug option to the cli#810
logaretm merged 2 commits into
mainfrom
awad/bundler-41-debug-likely-not-propagated-to-cli

Conversation

@logaretm

@logaretm logaretm commented Oct 10, 2025

Copy link
Copy Markdown
Member

This pull request adds logic to ensure we are properly passing the debug flag to the Sentry CLI via an environment variable by setting it on the process.env similar to other flags.

closes #673

@logaretm logaretm requested a review from Lms24 October 10, 2025 12:27
@linear

linear Bot commented Oct 10, 2025

Copy link
Copy Markdown

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for fixing!

EDIT: one suggestion to look at before we merge this

] = `${bundlerPluginMetaContext.buildTool}-plugin/${__PACKAGE_VERSION__}`;

// Propagate debug flag to Sentry CLI via environment variable
if (options.debug) {

@Lms24 Lms24 Oct 10, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

actually, let's only set this env var, if it isn't already set, wdyt? The main issue I wanna avoid is someone intentionally trying to silence the CLI output even if they set the plugin debug flag to true.

@logaretm logaretm Oct 10, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Makes sense to me, I can document this as well in the docs so they understand the precedence is:

ENV_IF_EXIST > CONFIG

EDIT: Done!

@logaretm logaretm merged commit b56403a into main Oct 10, 2025
23 checks passed
@logaretm logaretm deleted the awad/bundler-41-debug-likely-not-propagated-to-cli branch October 10, 2025 13:41
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 20, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 4.4.0 | 4.5.0 |


## [v4.5.0](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#450)

- docs: added info on debug flag value precedence ([#811](getsentry/sentry-javascript-bundler-plugins#811))
- feat: add debug statements after sourcemap uploads ([#812](getsentry/sentry-javascript-bundler-plugins#812))
- feat(core): Allow multi-project sourcemaps upload ([#813](getsentry/sentry-javascript-bundler-plugins#813))
- fix: propagate the debug option to the cli ([#810](getsentry/sentry-javascript-bundler-plugins#810))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debug likely not propagated to cli

2 participants