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

env LAUNCH_EDITOR gets overwritten #92

Closed
Smef opened this issue May 17, 2024 · 1 comment · Fixed by #93
Closed

env LAUNCH_EDITOR gets overwritten #92

Smef opened this issue May 17, 2024 · 1 comment · Fixed by #93

Comments

@Smef
Copy link
Contributor

Smef commented May 17, 2024

launch-editor looks for the env variable LAUNCH_EDITOR by default. This is getting overwritten in /packages/core/src/index.ts:174

This package takes a launchEditor option, which is then used to set this variable. Unfortunately this means that you can't set your env to have launch-editor use your preferred IDE.

Is this an intentional override, or would it be an acceptable change to use the process.env.LAUNCH_EDITOR if it's set, even if a launcEditoroption was not set?

This comes up as a problem in both Vue Devtools Next and Nuxt Devtools. Vue Devtools does have a launchEditor option which can be configured, but Nuxt Devtools does not.

Ether way, it seems like it might be good to not overwrite the environment variable for LAUNCH_EDITOR if one has been set.

I could submit a PR for this if this is not being overwritten for a specific reason. I think a good change would be to have the defaults use process.env.LAUNCH_EDITOR if it's set.

@Smef
Copy link
Contributor Author

Smef commented May 17, 2024

PR here: #93

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 a pull request may close this issue.

1 participant