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

Yamllint does not work in Windows: Overidding default command feature #32

Open
mflova opened this issue Jun 17, 2023 · 0 comments
Open

Comments

@mflova
Copy link

mflova commented Jun 17, 2023

At first, the debugging console said that the executable could not be found in $PATH after adding it, I was getting the following error:

Error while running "yamllint": spawnSync yamllint ENOENT
yamllint's command took 4ms

I realized that it is not working because for Windows users, the only possible way is through pip (docs). Due to this, executable is not a normal "binary" but a python script. And I guess this is where the plugin struggles. Potential solutions are:

  • Is there a quick fix I can do on my side for it? Right now I am calling yamllint with python3 -m yamllint. While in Ubuntu I did not need the python3 -m part, in Windows I do. I also tried defining an alias but of course it is not working.
  • About the fix in this repository, is there a possibility to call for python3 -m yamllint if calling yamllint throws this error?
  • I have also integrated linters into other IDEs by using these type of plugins. Few of them had the possibility to override the default command to avoid these issues. I think this would be the best option. With this, I could define in my settings.json from VSCode that I do not want to use the yamllint command but python3 -m yamllint. This will also solve potential problems that will arise with other plugins, as it provides with good enough flexibility.

I cannot think about any other possible solutions
Thanks!

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

No branches or pull requests

1 participant