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

Don't inject CWD parent into PATH #4108

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

garymm
Copy link
Contributor

@garymm garymm commented Apr 12, 2024

Previously if own_location was set to "", then os.path.realpath("") resolves to CWD, and then
if CWD/../ansible exists, CWD/.. was injected into PATH. This doesn't seem desirable or necessary.

@garymm
Copy link
Contributor Author

garymm commented Apr 12, 2024

An alternate fix for my issue would be to check if parent / "ansible" is executable before adding parent to the PATH. LMK if you prefer that fix.

previously if own_location was set to "", then
os.path.realpath("") resolves to CWD, and then
if CWD/../ansible exists, CWD/.. was injected into PATH.

This doesn't seem desirable or necessary.
@ssbarnea ssbarnea merged commit 30eb96e into ansible:main Apr 30, 2024
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants