Skip to content

Commit

Permalink
FIX: Temporary fix to fix the issue with unlinking previous version a…
Browse files Browse the repository at this point in the history
…nd linking the new one.
  • Loading branch information
gtsvetanov committed Apr 12, 2024
1 parent 7983615 commit 325d2b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brew-php-switcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ if [[ "${versions_map[*]}" == *"${selected_version}"* ]]; then
full_version=$(brew ls --versions "${selected_package_name}" | cut -d "${SPACE}" -f2)

# Switch terminal php version to selected one
brew unlink php &>/dev/null && brew link --overwrite --force "${selected_package_name}" &>/dev/null
brew unlink php &>/dev/null && brew unlink "${selected_package_name}" &>/dev/null && brew link --overwrite --force "${selected_package_name}" &>/dev/null

echo "${SUCCESS}✔ Terminal php version switched to ${selected_version} (${full_version})"

Expand Down Expand Up @@ -261,4 +261,4 @@ else
show_help
tput sgr0
exit 1
fi
fi

0 comments on commit 325d2b3

Please sign in to comment.