Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Failed to locate command: [Errno 2] No such file or directory: 'git' #2848

Closed
bcdady opened this issue Dec 29, 2022 · 1 comment
Closed

Failed to locate command: [Errno 2] No such file or directory: 'git' #2848

bcdady opened this issue Dec 29, 2022 · 1 comment
Labels

Comments

@bcdady
Copy link

bcdady commented Dec 29, 2022

Summary

The issue of 'git' not being automatically excluded has apparently regressed/reocurred, and so -- when the git command is not found, an error message is displayed when running ansible-lint --version.

I've just installed ansible-lint v6.10 (in a python:3-slim container) and see this error when running ansible-lint --version.

A similar / same symptom was previously addressed in #2641 / #2633 (reported for ansible-lint ver 6.8.4).

Issue Type
  • Bug Report
OS / ENVIRONMENT
$ ansible-lint --version

Failed to locate command: [Errno 2] No such file or directory: 'git'
ansible-lint 6.10.0 using ansible 2.13.7

Since the prior issue (#2641 in October) related to a "Fix pip version check", I'm including confirmation that a current version of pip is installed and running in this same container.

$ pip --version
pip 22.3.1 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)
  • ansible installation method: pip
  • ansible-lint installation method: pip (pipenv)

It seems the same issue is present in ansible-lint v6.9.1 and v6.8.7

$ pip install 'ansible-lint==6.9.*'
Defaulting to user installation because normal site-packages is not writeable
Collecting ansible-lint==6.9.*
...
Installing collected packages: ansible-lint
Successfully installed ansible-lint-6.9.1

$ ansible-lint --version
Failed to locate command: [Errno 2] No such file or directory: 'git'
ansible-lint 6.9.1 using ansible 2.13.7

$ pip uninstall ansible-lint
Found existing installation: ansible-lint 6.9.1
Uninstalling ansible-lint-6.9.1:
...
Successfully uninstalled ansible-lint-6.9.1

$ pip install 'ansible-lint==6.8.*'
Defaulting to user installation because normal site-packages is not writeable
Collecting ansible-lint==6.8.*
...
Installing collected packages: ansible-lint
Successfully installed ansible-lint-6.8.7

$ ansible-lint --version
Failed to locate command: [Errno 2] No such file or directory: 'git'
ansible-lint 6.8.7 using ansible 2.13.7
STEPS TO REPRODUCE
# Translated from the 'RUN' commands in my Dockerfile, as a non-root user (named ansible):

python -m pip install 'pip>=22'
pip install 'ansible>=6.0'
pip install 'ansible-lint>=6.0'
Desired Behavior

Unexpected / unnecesarry error messages are not shown when ansible-lint --version is run.

Actual Behavior

Unexpected / unnecesarry error messages are shown when ansible-lint --version is run.

@bcdady bcdady added bug new Triage required labels Dec 29, 2022
@ssbarnea
Copy link
Member

Did you check if this message is displayed on stderr or stdout? If is is on stderr, that is not a bug, if is on stdout, it is a bug.

@ssbarnea ssbarnea removed the new Triage required label Jan 1, 2023
@ansible ansible locked and limited conversation to collaborators Jan 1, 2023
@ssbarnea ssbarnea converted this issue into discussion #2859 Jan 1, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants