aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli
diff options
context:
space:
mode:
authorMarkus Reiter2016-11-10 14:48:53 +0100
committerMarkus Reiter2016-11-10 14:48:53 +0100
commit8dd8273d5e4bb2dc2892535803a550bcfde46c95 (patch)
tree476a08ca1c2d4805d4a4c100bb531cdb4b6dd1f4 /Library/Homebrew/cask/lib/hbc/cli
parent0f673cc27f10375bcc8d88a4b85908e7acb7cd48 (diff)
downloadbrew-8dd8273d5e4bb2dc2892535803a550bcfde46c95.tar.bz2
Remove unnecessary `Hbc::Locations` aliases.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/doctor.rb16
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/update.rb4
2 files changed, 7 insertions, 13 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
index dcccde13f..7e65f6b59 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
@@ -8,9 +8,9 @@ module Hbc
ohai "Ruby Path:", render_with_none_as_error(RbConfig.ruby)
# TODO: consider removing most Homebrew constants from doctor output
ohai "Homebrew Version:", render_with_none_as_error(homebrew_version)
- ohai "Homebrew Executable Path:", render_with_none_as_error(Hbc.homebrew_executable)
+ ohai "Homebrew Executable Path:", render_with_none_as_error(HOMEBREW_BREW_FILE)
ohai "Homebrew Cellar Path:", render_with_none_as_error(homebrew_cellar)
- ohai "Homebrew Repository Path:", render_with_none_as_error(homebrew_repository)
+ ohai "Homebrew Repository Path:", render_with_none_as_error(HOMEBREW_REPOSITORY)
ohai "Homebrew Origin:", render_with_none_as_error(homebrew_origin)
ohai "Homebrew-Cask Version:", render_with_none_as_error(Hbc.full_version)
ohai "Homebrew-Cask Install Location:", render_install_location
@@ -48,7 +48,7 @@ module Hbc
def self.homebrew_origin
homebrew_origin = notfound_string
begin
- Dir.chdir(homebrew_repository) do
+ Dir.chdir(HOMEBREW_REPOSITORY) do
homebrew_origin = SystemCommand.run("/usr/bin/git",
args: %w[config --get remote.origin.url],
print_stderr: false).stdout.strip
@@ -64,10 +64,6 @@ module Hbc
homebrew_origin
end
- def self.homebrew_repository
- homebrew_constants("repository")
- end
-
def self.homebrew_cellar
homebrew_constants("cellar")
end
@@ -77,9 +73,7 @@ module Hbc
end
def self.homebrew_taps
- @homebrew_taps ||= if homebrew_repository.respond_to?(:join)
- homebrew_repository.join("Library", "Taps")
- end
+ Tap::TAP_DIRECTORY
end
def self.homebrew_constants(name)
@@ -87,7 +81,7 @@ module Hbc
return @homebrew_constants[name] if @homebrew_constants.key?(name)
@homebrew_constants[name] = notfound_string
begin
- @homebrew_constants[name] = SystemCommand.run!(Hbc.homebrew_executable,
+ @homebrew_constants[name] = SystemCommand.run!(HOMEBREW_BREW_FILE,
args: ["--#{name}"],
print_stderr: false)
.stdout
diff --git a/Library/Homebrew/cask/lib/hbc/cli/update.rb b/Library/Homebrew/cask/lib/hbc/cli/update.rb
index 1d6ed2af5..86d02bb55 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/update.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/update.rb
@@ -2,8 +2,8 @@ module Hbc
class CLI
class Update < Base
def self.run(*_ignored)
- result = SystemCommand.run(Hbc.homebrew_executable,
- args: %w[update])
+ result = SystemCommand.run(HOMEBREW_BREW_FILE,
+ args: ["update"])
# TODO: separating stderr/stdout is undesirable here.
# Hbc::SystemCommand should have an option for plain
# unbuffered output.