Fix check in add_path

Add composer_bin to the PATH after a tool is added using composer
This commit is contained in:
Shivam Mathur
2022-02-09 00:53:56 +05:30
parent 46c34bb6a5
commit a72a638da4
3 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ get_shell_profile() {
# Function to add a path to the PATH variable.
add_path() {
path_to_add=$1
[ ! -d "$path_to_add" ] && [[ ":$PATH:" == *":$path_to_add:"* ]] && return
{ [ ! -d "$path_to_add" ] || [[ ":$PATH:" == *":$path_to_add:"* ]]; } && return
if [[ -n "$GITHUB_PATH" ]]; then
echo "$path_to_add" | tee -a "$GITHUB_PATH" >/dev/null 2>&1
else