Skip to content

Commit 8dcd37f

Browse files
committed
Improve macos php setup
Run dependency install as a seperate command. Remove chown command as it is not required anymore it seems Fix add_brew_tap call
1 parent a909b43 commit 8dcd37f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/scripts/darwin.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,19 @@ add_php() {
177177
php_formula="shivammathur/php/$php_keg"
178178
if [[ "$existing_version" = "false" || -n "$suffix" || "$action" = "upgrade" ]]; then
179179
update_dependencies
180-
add_brew_tap
180+
add_brew_tap "$php_tap"
181181
fi
182182
if [[ "$existing_version" != "false" && -z "$suffix" ]]; then
183183
if [ "$action" = "upgrade" ]; then
184+
brew install --only-dependencies "$php_formula"
184185
brew upgrade -f --overwrite "$php_formula"
185186
else
186187
brew unlink "$php_keg"
187188
fi
188189
else
189-
brew install -f --overwrite "$php_formula" || brew upgrade -f --overwrite "$php_formula"
190+
brew install --only-dependencies "$php_formula"
191+
brew install -f --overwrite "$php_formula" 2>/dev/null || brew upgrade -f --overwrite "$php_formula"
190192
fi
191-
sudo chown -R "$(id -un)":"$(id -gn)" "$brew_prefix"
192193
brew link --force --overwrite "$php_keg"
193194
}
194195

0 commit comments

Comments
 (0)