Merge pull request #14435 from MikeMcQuaid/install_from_api_head
install: better error when using API and --HEAD.
This commit is contained in:
commit
7b4f025ca6
@ -96,8 +96,8 @@ begin
|
||||
odie <<~EOS
|
||||
This command cannot be run while Homebrew/homebrew-core is untapped and
|
||||
HOMEBREW_NO_INSTALL_FROM_API is unset! To resolve please run:
|
||||
brew tap Homebrew/core
|
||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||
brew tap Homebrew/core
|
||||
and retry this command.
|
||||
EOS
|
||||
end
|
||||
|
||||
@ -65,8 +65,8 @@ module Homebrew
|
||||
<<~EOS
|
||||
#{not_exist_message}
|
||||
This is expected with HOMEBREW_NO_INSTALL_FROM_API unset! To resolve please run:
|
||||
brew tap Homebrew/core
|
||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||
brew tap Homebrew/core
|
||||
and retry this command.
|
||||
EOS
|
||||
elsif args.cask?
|
||||
|
||||
@ -1185,8 +1185,8 @@ class FormulaInstaller
|
||||
odie <<~EOS
|
||||
Unable to build #{formula.name} from source while Homebrew/homebrew-core is
|
||||
untapped and HOMEBREW_NO_INSTALL_FROM_API is unset! To resolve please run:
|
||||
brew tap Homebrew/core
|
||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||
brew tap Homebrew/core
|
||||
and retry.
|
||||
EOS
|
||||
else
|
||||
|
||||
@ -113,6 +113,15 @@ module Homebrew
|
||||
EOS
|
||||
end
|
||||
|
||||
if head && Homebrew::EnvConfig.install_from_api?
|
||||
raise UsageError, <<~EOS
|
||||
--HEAD is not supported with HOMEBREW_NO_INSTALL_FROM_API unset! To resolve please run:
|
||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||
brew tap Homebrew/core
|
||||
and retry this command.
|
||||
EOS
|
||||
end
|
||||
|
||||
# --HEAD, fail with no head defined
|
||||
odie "No head is defined for #{f.full_name}" if head && f.head.nil?
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user