ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
366 stars 92 forks source link

'ansible-lint --version' WARNING: PATH altered to expand ~ in it #1413

Open OneCyrus opened 5 months ago

OneCyrus commented 5 months ago

Summary

when using ansible lint on a machine with dotnet installed i get the following error:

cmd 'ansible-lint --version' has the following error/warning: WARNING: PATH altered to expand ~ in it. Read https://stackoverflow.com/a/44704799/99834 and correct your system configuration.

unfortunately dotnet is using "~/.dotnet/tools" in the path variable and that's how it works.

version parsing for ansible lint should ignore warnings. looks like the version parsing could be improved to handle this case.

Extension version

v24.8.1

VS Code version

1.90.2

Ansible Version

ansible [core 2.17.1]
  config file = /workspaces/automation-data/ansible.cfg
  configured module search path = ['/home/vscode/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /workspaces/automation-data/.venv/lib/python3.11/site-packages/ansible
  ansible collection location = /home/vscode/.ansible/collections:/usr/share/ansible/collections
  executable location = /workspaces/automation-data/.venv/bin/ansible
  python version = 3.11.9 (main, May 14 2024, 08:04:54) [GCC 12.2.0] (/workspaces/automation-data/.venv/bin/python)
  jinja version = 3.1.4
  libyaml = True

OS / Environment

Ubuntu 22.04

Relevant log output

ansible-lint --version
WARNING: PATH altered to expand ~ in it. Read https://stackoverflow.com/a/44704799/99834 and correct your system configuration.
ansible-lint 24.6.1 using ansible-core:2.17.1 ansible-compat:24.6.1 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
priyamsahoo commented 4 months ago

@OneCyrus, the version output is coming from the ansible-lint CLI tool. I wanted to understand whether it is creating any problems in the VS Code extension. If not, please transfer this issue to the ansible-lint repository.