Skip to content
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(cli): patch missing SYSTEMROOT env var on windows #4221

Merged
merged 1 commit into from Mar 1, 2023

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Feb 28, 2023

Description

The open module tries to use the SYSTEMROOT environment variable on Windows, which seems to (sometimes?) not exist. Some backgrounds here: sindresorhus/open#299

Sindre seems unwilling to fix in the open module, so I figure we might as well implement a workaround for it since it currently causes issues for onboarding of new users on Windows (the login action will fail when attempting to open a browser).

Fixes #4195
Fixes #4194
[sc-30570]

What to review

  • Code looks reasonable (I haven't been able to reproduce/test this on Windows)

Notes for release

  • Fixes an issue where opening a browser from the CLI tool on Windows might crash

@rexxars rexxars requested a review from bjoerge February 28, 2023 16:28
@vercel
Copy link

vercel bot commented Feb 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 28, 2023 at 4:28PM (UTC)
2 Ignored Deployments
Name Status Preview Comments Updated
performance-studio ⬜️ Ignored (Inspect) Feb 28, 2023 at 4:28PM (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 28, 2023 at 4:28PM (UTC)

@rexxars rexxars added this pull request to the merge queue Mar 1, 2023
Merged via the queue into next with commit 2b9beaf Mar 1, 2023
6 checks passed
@rexxars rexxars deleted the fix/missing-windows-env-var branch March 1, 2023 04:19
* `process.env.SYSTEMROOT` is sometimes `undefined`, whereas `process.env.SystemRoot` is _NOT_.
*
* The `open` npm module uses the former to open a browser on Powershell, and Sindre seems
* unwilling to fix it (https://github.com/sindresorhus/open/pull/299#issuecomment-1447587598),
Copy link

Choose a reason for hiding this comment

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

That's not what I said. I said I wanted to see an issue posted on Node.js first, so it can be properly fixed eventually. When that's done, I'm happy to merge the workaround.

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.

First time setup/signup failing I have an account but still seeing this error
3 participants