VSCode spawn C:\WINDOWS\system32\cmd.exe ENOENT

This is a known issue, but it is not a bug. This happens when the Red Hat Ansible extension tries to run ansible-lint on Windows, but can’t because ansible and ansible-lint doesn’t exist on Windows. The solution is to configure remote extensions for VSCode to run on a remote linux instance (such as inside WSL or a remote linux machine over ssh), or to use VSCode directly on Linux.

Please see marko-hologram’s comment:
https://github.com/ansible/vscode-ansible/issues/681#issuecomment-1399360498

2 Likes