fix: hide console window when running 'git rev-parse HEAD' on Windows#941
Merged
andreiborza merged 1 commit intoJun 17, 2026
Merged
Conversation
andreiborza
approved these changes
Jun 17, 2026
andreiborza
left a comment
Member
There was a problem hiding this comment.
Hi @jwwisgerhof, thanks for contributing this, sounds like a good improvement to me!
5 tasks
renovate Bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Jul 15, 2026
| datasource | package | from | to | | ---------- | ------------------- | ----- | ----- | | npm | @sentry/vite-plugin | 5.3.0 | 5.4.0 | ## [v5.4.0](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#540) ##### Important Changes ✨ The Sentry bundler plugins are moving to our main [`sentry-javascript`](https://github.com/getsentry/sentry-javascript) monorepo and will be bumped to version `11.0.0` with the next SDK major release. In preparation, we've already ported the `@sentry/bundler-plugin-core` and `sentry/babel-plugin-component-annotate` packages, which are now merged and called `@@sentry/bundler-plugins`. If you're using any of our bundler plugins (e.g. `@sentry/vite-plugin`), nothing will change for you at the moment. If you encounter any problems, please open an issue in [`getsentry/sentry-javascript`](https://github.com/getsentry/sentry-javascript) going forward. Thank you! This repo will be closed after the v11 bump. Related PRs: - Depend on JavaScript repo package. by [@timfish](https://github.com/timfish) in [#945](getsentry/sentry-javascript-bundler-plugins#945) - Add `@sentry/bundler-plugins` core package by [@timfish](https://github.com/timfish) in [#938](getsentry/sentry-javascript-bundler-plugins#938) - Remove obsolete packages by [@timfish](https://github.com/timfish) in [#947](getsentry/sentry-javascript-bundler-plugins#947) ##### Bug Fixes 🐛 - (webpack) Make `webpack` import lazy to support rspack-only projects by [@s1gr1d](https://github.com/s1gr1d) in [#940](getsentry/sentry-javascript-bundler-plugins#940) - Hide console window when running 'git rev-parse HEAD' on Windows by [@jwwisgerhof](https://github.com/jwwisgerhof) in [#941](getsentry/sentry-javascript-bundler-plugins#941) ##### Internal Changes 🔧 - Update Sentry SDK for telemetry by [@timfish](https://github.com/timfish) in [#937](getsentry/sentry-javascript-bundler-plugins#937) - (sentry-cli) Upgrade to 2.58.6 by [@szokeasaurusrex](https://github.com/szokeasaurusrex) in [#936](getsentry/sentry-javascript-bundler-plugins#936) - Remove versions from telemetry snapshots by [@timfish](https://github.com/timfish) in [#946](getsentry/sentry-javascript-bundler-plugins#946) - Align lint configuration with JavaScript repo by [@timfish](https://github.com/timfish) in [#933](getsentry/sentry-javascript-bundler-plugins#933) - Align TypeScript configuration with JavaScript repo by [@timfish](https://github.com/timfish) in [#932](getsentry/sentry-javascript-bundler-plugins#932) - Fix CI caching on Windows by [@timfish](https://github.com/timfish) in [#934](getsentry/sentry-javascript-bundler-plugins#934) - Remove `ts-node` usage by [@timfish](https://github.com/timfish) in [#931](getsentry/sentry-javascript-bundler-plugins#931)
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.
gitRevision()inpackages/bundler-plugins/src/core/utils.tsrunsexecSync("git rev-parse HEAD", { stdio: [...] })to auto-detect the release name. It passes nowindowsHide, and Node'schild_processdefaults it tofalse. This is the fallbackdetermineReleaseName()uses in local dev (when no CI/SENTRY_RELEASEenv var is set).When the bundler config is loaded by a console-less parent process, Windows allocates a new console for the git child and the default-terminal handoff renders it as a visible terminal window that flashes up and steals focus.
Real-world impact
This is probably quite limited in real world impact as this command should not be run on local dev machines. However, where it does, it fires constantly when running a Vite project inside (for example) an Nx workspace (
nx serve): Nx's project-graph daemon reloads the Vite config — and thus the Sentry plugin's release detection — in a console-less plugin worker on every file save, so a terminal window flashes every single time you save a file. Surfaced via nrwl/nx-console#2906 (comment) (there's a companion fix in Vite for its ownnet usecall).Fix
Add
windowsHide: trueto theexecSyncoptions. No behavioural change to release detection;windowsHidedoes nothing on macOS/Linux.Tests
Added a unit test asserting
execSyncis invoked withwindowsHide: true.