-
Notifications
You must be signed in to change notification settings - Fork 50
fix: propagate the debug option to the cli #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: propagate the debug option to the cli #810
Conversation
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
| 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))
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.envsimilar to other flags.closes #673