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

Pkg doesn't account for env variables in EDITOR #24

Open
Andarist opened this issue Jan 23, 2021 · 0 comments
Open

Pkg doesn't account for env variables in EDITOR #24

Andarist opened this issue Jan 23, 2021 · 0 comments

Comments

@Andarist
Copy link

const editorOpts = ExternalEditor.splitStringBySpace(editor).map((piece: string) => piece.replace("\\ ", " "));
const bin = editorOpts.shift();

This doesn't account for env variables in the EDITOR variable and people might keep smth like this there:

NVIM_TUI_ENABLE_COLOR=1 nvim

which leads to an attempt to spawn NVIM_TUI_ENABLE_COLOR=1 here:

const editorProcess = spawnSync(
this.editor.bin,

which is, obviously, not correct 😉

I'm not suuuuper sure if it's valid to keep env vars in EDITOR like this but according to my testing at least git handles this OK.

This got initially reported here:
changesets/changesets#498

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

No branches or pull requests

1 participant