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
|
odie <<~EOS
|
||||||
This command cannot be run while Homebrew/homebrew-core is untapped and
|
This command cannot be run while Homebrew/homebrew-core is untapped and
|
||||||
HOMEBREW_NO_INSTALL_FROM_API is unset! To resolve please run:
|
HOMEBREW_NO_INSTALL_FROM_API is unset! To resolve please run:
|
||||||
brew tap Homebrew/core
|
|
||||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||||
|
brew tap Homebrew/core
|
||||||
and retry this command.
|
and retry this command.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|||||||
@ -65,8 +65,8 @@ module Homebrew
|
|||||||
<<~EOS
|
<<~EOS
|
||||||
#{not_exist_message}
|
#{not_exist_message}
|
||||||
This is expected with HOMEBREW_NO_INSTALL_FROM_API unset! To resolve please run:
|
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
|
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||||
|
brew tap Homebrew/core
|
||||||
and retry this command.
|
and retry this command.
|
||||||
EOS
|
EOS
|
||||||
elsif args.cask?
|
elsif args.cask?
|
||||||
|
|||||||
@ -1185,8 +1185,8 @@ class FormulaInstaller
|
|||||||
odie <<~EOS
|
odie <<~EOS
|
||||||
Unable to build #{formula.name} from source while Homebrew/homebrew-core is
|
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:
|
untapped and HOMEBREW_NO_INSTALL_FROM_API is unset! To resolve please run:
|
||||||
brew tap Homebrew/core
|
|
||||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||||
|
brew tap Homebrew/core
|
||||||
and retry.
|
and retry.
|
||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
|
|||||||
@ -113,6 +113,15 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
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
|
# --HEAD, fail with no head defined
|
||||||
odie "No head is defined for #{f.full_name}" if head && f.head.nil?
|
odie "No head is defined for #{f.full_name}" if head && f.head.nil?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user