diff --git a/bin/brew-cask b/bin/brew-cask index 110785e42c..c97dc3fcd6 100755 --- a/bin/brew-cask +++ b/bin/brew-cask @@ -99,7 +99,7 @@ find_ruby_2_plus () { else IFS=$'\n' rubies=( $(/usr/bin/type -aP ruby) \ "/usr/local/bin/ruby" \ - "$(brew --prefix 2>/dev/null)/bin/ruby" ) + "$(brew --repository 2>/dev/null)/bin/ruby" ) for ruby in "${rubies[@]}"; do version_str="$("$ruby" --version 2>/dev/null)" if [[ "$version_str" =~ ^ruby.2 ]]; then diff --git a/brew-cask.rb b/brew-cask.rb index 12ad303f81..db910ebb63 100644 --- a/brew-cask.rb +++ b/brew-cask.rb @@ -23,7 +23,7 @@ class Ruby20Requirement < Requirement rubies = `/usr/bin/type -aP ruby`.split("\n") rubies += [ "/usr/local/bin/ruby", - "#{`brew --prefix 2>/dev/null`.strip}/bin/ruby", + "#{`brew --repository 2>/dev/null`.strip}/bin/ruby", ] rubies.uniq.each do |ruby| diff --git a/developer/bin/develop_brew_cask b/developer/bin/develop_brew_cask index 5c828b31e4..b8e3877138 100755 --- a/developer/bin/develop_brew_cask +++ b/developer/bin/develop_brew_cask @@ -120,10 +120,10 @@ _main () { # initialization cd_to_project_root local git_root="$(/bin/pwd)" - local brew_prefix="$(brew --prefix)" - local cellar_dir="$brew_prefix/Cellar/brew-cask" + local brew_repository="$(brew --repository)" + local cellar_dir="$brew_repository/Cellar/brew-cask" local version_dir="$(/bin/ls -- "$cellar_dir/" | /usr/bin/sort | /usr/bin/tail -1)" - local tap_dir="$brew_prefix/$tap_subdir" + local tap_dir="$brew_repository/$tap_subdir" # sanity check not_inside_homebrew "$tap_dir" "$git_root"