Fix get_extension_from_formula in darwin.sh

This commit is contained in:
Shivam Mathur 2022-11-16 10:40:40 +05:30
parent 4704ad638a
commit 173ca15c9b
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -28,7 +28,7 @@ disable_extension_helper() {
get_extension_from_formula() {
local formula=$1
local extension
extension=$(grep "$formula=" "$src"/configs/brew_extensions | cut -d '=' -f 2)
extension=$(grep -E "^$formula=" "$src"/configs/brew_extensions | cut -d '=' -f 2)
[[ -z "$extension" ]] && extension="$(echo "$formula" | sed -E "s/pecl_|[0-9]//g")"
echo "$extension"
}