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

%ComSpec% ignored by vim-plug #1302

Open
Finxx1 opened this issue Jan 9, 2025 · 0 comments
Open

%ComSpec% ignored by vim-plug #1302

Finxx1 opened this issue Jan 9, 2025 · 0 comments
Labels

Comments

@Finxx1
Copy link

Finxx1 commented Jan 9, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants