diff options
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/list.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/locations.rb | 27 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/url.rb | 7 |
4 files changed, 6 insertions, 35 deletions
diff --git a/Library/Homebrew/cask/lib/hbc.rb b/Library/Homebrew/cask/lib/hbc.rb index 3cdec07d2..363879574 100644 --- a/Library/Homebrew/cask/lib/hbc.rb +++ b/Library/Homebrew/cask/lib/hbc.rb @@ -1,6 +1,6 @@ -module Hbc; end - require "hardware" +require "utils" + require "hbc/artifact" require "hbc/audit" require "hbc/auditor" @@ -34,7 +34,6 @@ require "hbc/url_checker" require "hbc/utils" require "hbc/verify" require "hbc/version" -require "utils" module Hbc include Locations diff --git a/Library/Homebrew/cask/lib/hbc/cli/list.rb b/Library/Homebrew/cask/lib/hbc/cli/list.rb index e100fbd83..5d7a58b93 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/list.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/list.rb @@ -83,7 +83,7 @@ module Hbc end def self.needs_init? - false + true end end end diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb index 7a0f93851..80add91dd 100644 --- a/Library/Homebrew/cask/lib/hbc/locations.rb +++ b/Library/Homebrew/cask/lib/hbc/locations.rb @@ -7,35 +7,10 @@ module Hbc end module ClassMethods - def legacy_caskroom - @legacy_caskroom ||= Pathname.new("/opt/homebrew-cask/Caskroom") - end - - def default_caskroom - @default_caskroom ||= HOMEBREW_PREFIX.join("Caskroom") - end - attr_writer :caskroom def caskroom - @caskroom ||= begin - if Utils.path_occupied?(legacy_caskroom) - opoo <<-EOS.undent - The default Caskroom location has moved to #{default_caskroom}. - - Please migrate your Casks to the new location and delete #{legacy_caskroom}, - or if you would like to keep your Caskroom at #{legacy_caskroom}, add the - following to your HOMEBREW_CASK_OPTS: - - --caskroom=#{legacy_caskroom} - - For more details on each of those options, see https://github.com/caskroom/homebrew-cask/issues/21913. - EOS - legacy_caskroom - else - default_caskroom - end - end + @caskroom ||= HOMEBREW_PREFIX.join("Caskroom") end attr_writer :cache diff --git a/Library/Homebrew/cask/lib/hbc/url.rb b/Library/Homebrew/cask/lib/hbc/url.rb index c09aaa061..1a5101da1 100644 --- a/Library/Homebrew/cask/lib/hbc/url.rb +++ b/Library/Homebrew/cask/lib/hbc/url.rb @@ -29,11 +29,8 @@ module Hbc end def user_agent - if @user_agent == :fake - FAKE_USER_AGENT - else - @user_agent - end + return FAKE_USER_AGENT if @user_agent == :fake + @user_agent end end end |
