ofek / userpath

Cross-platform tool for adding locations to the user PATH, no elevated privileges required!
MIT License
151 stars 20 forks source link

Handle OSErrors when running show path commands #52

Open jefferyto opened 7 months ago

jefferyto commented 7 months ago

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.