junegunn / junegunn/vim-plug

%ComSpec% ignored by vim-plug

Open
#1,302 0 comments 0 reactions 0 assignees View on GitHub
windows
Dominant language
Vim Script
Stars
35.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

On Windows, the standard environment variable %ComSpec% should be used to overwrite the command processor. However, vim-plug hard-codes the use of cmd.exe. This means that if cmd.exe fails (which can happen if it is blocked) jobs will always fail, giving the error `Job failed to start`.

The following is the line where it is hard coded, at line 1452.
```vimscript
let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd]
let jid = job_start(s:is_win ? join(argv, ' ') : argv, {
```

Replacing cmd with what I have set in %ComSpec% allows the jobs to start, but this solution has major shortcomings, like breaking any time vim-plug should be updated. What would be better is to check the value of ComSpec first, and falling back to cmd if it is an invalid value.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.