vite-plugin-vue-inspector icon indicating copy to clipboard operation
vite-plugin-vue-inspector copied to clipboard

env LAUNCH_EDITOR gets overwritten

Open Smef opened this issue 1 month ago • 1 comments

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 avatar May 17 '24 19:05 Smef