Fix find call in darwin.sh in copy_brew_extensions on failure

This commit is contained in:
Shivam Mathur 2023-09-22 14:07:12 +05:30
parent 10c12b9377
commit e83e329355
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -43,7 +43,9 @@ copy_brew_extensions() {
extension_file="${brew_prefix:?}/opt/$dependency/$(get_extension_from_formula "${dependency%@*}").so" extension_file="${brew_prefix:?}/opt/$dependency/$(get_extension_from_formula "${dependency%@*}").so"
[ -e "$extension_file" ] && sudo cp "$extension_file" "$ext_dir" [ -e "$extension_file" ] && sudo cp "$extension_file" "$ext_dir"
done done
sudo find -- "$brew_prefix"/Cellar/"$formula"@"$version" -name "*.dylib" -exec cp {} "$ext_dir" \; if [ -d "$brew_prefix"/Cellar/"$formula"@"$version" ]; then
sudo find -- "$brew_prefix"/Cellar/"$formula"@"$version" -name "*.dylib" -exec cp {} "$ext_dir" \;
fi
} }
# Function to install a php extension from shivammathur/extensions tap. # Function to install a php extension from shivammathur/extensions tap.