mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-24 20:51:06 +07:00
Fix brew link step
We add --overwrite parameter to brew install and upgrade commands, so that in the linking step it does not fail if another php version is linked
This commit is contained in:
parent
fdb0d9d1a7
commit
fc14643b0a
@ -164,9 +164,9 @@ add_php() {
|
||||
suffix="$(get_php_formula_suffix)"
|
||||
php_formula="shivammathur/php/php@$version$suffix"
|
||||
if [[ "$existing_version" != "false" && -z "$suffix" ]]; then
|
||||
([ "$action" = "upgrade" ] && brew upgrade -f "$php_formula") || brew unlink "$php_formula"
|
||||
([ "$action" = "upgrade" ] && brew upgrade -f --overwrite "$php_formula") || brew unlink "$php_formula"
|
||||
else
|
||||
brew install -f "$php_formula"
|
||||
brew install -f --overwrite "$php_formula"
|
||||
fi
|
||||
sudo chown -R "$(id -un)":"$(id -gn)" "$brew_prefix"
|
||||
brew link --force --overwrite "$php_formula"
|
||||
|
Loading…
Reference in New Issue
Block a user