Skip to content

python-exec triggers a warning when starting ansible-lint #12

@pva

Description

@pva

Whenever I run ansible-lint on Gentoo system, I get a warning:

WARNING: PATH altered to include /usr/lib/python-exec/python3.10 :: This is usually a sign of broken local setup, which can cause unexpected behaviors.

This is because ansible-lint adds a binary path into system $PATH and the path binary has (/usr/lib/python-exec/python3.10/) is not in system PATH:
https://github.com/ansible/ansible-lint/blob/main/src/ansiblelint/__main__.py#L468

I think python-exec should add a binary path to PATH. Something like this (before exec()) fixed issue for me:

os.environ["PATH"] += os.pathsep + os.path.join('/usr/lib/python-exec', EPYTHON)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions