forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Help Wantedhelp is requested from collaborators, please!help is requested from collaborators, please!
Description
It's just an optimization for a *nix shell script. The behaviour is still present in current main branch.
export PATH="$HOME/bin:$PATH"
the PATH should only be extended, if the directory exists and is not already included in PATH
if [ -d ${HOME}/bin ]
then
if [[ ! $PATH = *${HOME}/bin* ]]
then
export PATH="$HOME/bin:$PATH"
fi
fi
Maybe the second test (that PATH already includes the directory) must be omitted because not every shell supports this check.
Metadata
Metadata
Assignees
Labels
Help Wantedhelp is requested from collaborators, please!help is requested from collaborators, please!