cmd/update-report: use api_auto_update_secs default.
Otherwise this can be printed incorrectly. As reported in https://github.com/Homebrew/brew/pull/14592#issuecomment-1623578695
This commit is contained in:
parent
6959029ebc
commit
28817dfe6c
@ -373,7 +373,9 @@ module Homebrew
|
||||
def install_from_api_message
|
||||
return if Settings.read("installfromapimessage") == "true"
|
||||
|
||||
auto_update_secs_set = Homebrew::EnvConfig.api_auto_update_secs.to_i.positive?
|
||||
api_auto_update_secs = Homebrew::EnvConfig.api_auto_update_secs.to_i
|
||||
api_auto_update_secs_default = Homebrew::EnvConfig::ENVS.fetch(:HOMEBREW_API_AUTO_UPDATE_SECS).fetch(:default)
|
||||
auto_update_secs_set = api_auto_update_secs.positive? && api_auto_update_secs != api_auto_update_secs_default
|
||||
if !Homebrew::EnvConfig.no_auto_update? && !Homebrew::EnvConfig.no_install_from_api? && !auto_update_secs_set
|
||||
return
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user