Merge pull request #13815 from Rylan12/developers-api

Allow developers to use dev commands and `HOMEBREW_INSTALL_FROM_API`
This commit is contained in:
Mike McQuaid 2022-09-07 12:37:19 +01:00 committed by GitHub
commit 93ea8cb2c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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