mirror of
https://github.com/wavetermdev/homebrew-cask.git
synced 2026-08-05 13:43:24 -07:00
last changes of 'brew --prefix' into 'brew --repository'
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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|
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user