Allow developers to use dev commands and HOMEBREW_INSTALL_FROM_API

This commit is contained in:
Rylan Polster 2022-09-06 12:59:13 -04:00
parent 89cb768055
commit 7ee35c6a0c
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -86,7 +86,8 @@ begin
end end
if internal_cmd || Commands.external_ruby_v2_cmd_path(cmd) if internal_cmd || Commands.external_ruby_v2_cmd_path(cmd)
if Commands::INSTALL_FROM_API_FORBIDDEN_COMMANDS.include?(cmd) && Homebrew::EnvConfig.install_from_api? if Commands::INSTALL_FROM_API_FORBIDDEN_COMMANDS.include?(cmd) &&
Homebrew::EnvConfig.install_from_api? && !Homebrew::EnvConfig.developer?
odie "This command cannot be run while HOMEBREW_INSTALL_FROM_API is set!" odie "This command cannot be run while HOMEBREW_INSTALL_FROM_API is set!"
end end