0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.05k stars 151 forks source link

Only prepend /usr/local/bin to $PATH if its not already there. #64

Closed emirkmo closed 1 year ago

emirkmo commented 1 year ago

During install, only prepend /usr/local/bin to $PATH if its not already in the $PATH.

Problem:

As many commons scripts already add /usr/local/bin it to path, we do not want to overwrite these, especially since it may cause PATH conflicts.

For example brew or conda might have preferences for this not being the first entry, but might already add it. So do not overwrite the path with such a destructive choice if we can already find /usr/local/bin in Path. Only add it if we do not find it.

0xacx commented 1 year ago

@emirkmo Thank you for this PR! 🙏