Skip to content

%ComSpec% ignored by vim-plug #1302

@Finxx1

Description

@Finxx1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions