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

Use shutil when looking for executables on the host system #1146

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

mkrasnitski
Copy link
Contributor

Description

The implementation of the which function only checks for the executable flag on paths, which means it can return a directory (at least on POSIX), causing weird permission errors down the line. It should instead defer to shutil.which; that function contains a platform-agnostic implementation that should hopefully match the behavior of the GNU which utility.

Checklist

  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • If my change adds new code, adequate tests have been added.
  • I have read and agree to the CONTRIBUTING document.

Copy link

🤖 Coverage update for f053502 🟢

Old New
Commit ba70548 f053502
Score 71.2773% 71.2773% (0)

Copy link
Collaborator

@Grazfather Grazfather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Looks good. Have a tiny rec to simplify

gef.py Outdated Show resolved Hide resolved
Co-authored-by: Grazfather <[email protected]>
Copy link

🤖 Coverage update for a00d9f1 🟢

Old New
Commit ba70548 a00d9f1
Score 71.2773% 71.2773% (0)

gef.py Outdated Show resolved Hide resolved
Co-authored-by: crazy hugsy <[email protected]>
Copy link

🤖 Coverage update for 13ff22c 🟢

Old New
Commit ba70548 13ff22c
Score 71.2773% 71.2773% (0)

@hugsy hugsy merged commit 5376d78 into hugsy:main Oct 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants