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

Handle OSErrors when running show path commands #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jefferyto
Copy link

Bash may not always be installed, for example on OpenWrt, and attempting to call the show path commands for Bash will cause a FileNotFoundError to be raised.

This wraps the subprocess call with a try statement and returns the empty string in the case of an OSError.

Bash may not always be installed, for example on OpenWrt, and attempting
to call the show path commands for Bash will cause a FileNotFoundError
to be raised.

This wraps the subprocess call with a try statement and returns the
empty string in the case of an OSError.
jefferyto added a commit to jefferyto/openwrt-packages that referenced this pull request Nov 10, 2023
The patches have been submitted upstream in
ofek/userpath#52 and
ofek/userpath#53.

From the README:

This is a tool for modifying a user's PATH.

Signed-off-by: Jeffery To <[email protected]>
1715173329 pushed a commit to openwrt/packages that referenced this pull request Nov 15, 2023
The patches have been submitted upstream in
ofek/userpath#52 and
ofek/userpath#53.

From the README:

This is a tool for modifying a user's PATH.

Signed-off-by: Jeffery To <[email protected]>
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.

1 participant