From 36d70683e90ca4d08b23b400110ab8459df76e80 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sat, 9 Apr 2022 19:14:52 +0530 Subject: [PATCH] Fix patching brew --- src/scripts/darwin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index c74f0907..59a97e28 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -142,10 +142,10 @@ link_libraries() { # Patch brew to overwrite packages. patch_brew() { formula_installer="$brew_repo"/Library/Homebrew/formula_installer.rb - code=" keg.link(verbose: verbose?" - sudo sed -i '' "s/$code)/$code, overwrite: true)/" "$formula_installer" + code=" keg.link\(verbose: verbose\?" + sudo sed -Ei '' "s/$code.*/$code, overwrite: true\)/" "$formula_installer" # shellcheck disable=SC2064 - trap "sudo sed -i '' 's/$code, overwrite: true)/$code)/' $formula_installer" exit + trap "sudo sed -Ei '' 's/$code.*/$code, overwrite: overwrite?\)/' $formula_installer" exit } # Helper function to update the dependencies.