node-external-editor icon indicating copy to clipboard operation
node-external-editor copied to clipboard

Pkg doesn't account for env variables in EDITOR

Open Andarist opened this issue 4 years ago • 0 comments

https://github.com/mrkmg/node-external-editor/blob/e1070a8295b8ebbafa7b29802ae0e2da0fad47c0/src/index.ts#L141-L142

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: https://github.com/mrkmg/node-external-editor/blob/e1070a8295b8ebbafa7b29802ae0e2da0fad47c0/src/index.ts#L191-L192 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: https://github.com/atlassian/changesets/issues/498

Andarist avatar Jan 23 '21 10:01 Andarist