Skip to content

Commit

Permalink
Fix patching brew
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Apr 9, 2022
1 parent 7a9bf9e commit 36d7068
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 36d7068

Please sign in to comment.