-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
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.
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.