Update IsHCPExplicitelyEnabled logic

nywilken/hcp_all_errors_at_once
Wilken Rivera 4 years ago
parent e829967a7a
commit c6194f1542

@ -47,6 +47,6 @@ func IsHCPDisabled() bool {
// IsHCPExplicitelyEnabled returns true if the client enabled HCP_PACKER_REGISTRY explicitely, i.e. it is defined and not 0 or off
func IsHCPExplicitelyEnabled() bool {
hcp, ok := os.LookupEnv(HCPPackerRegistry)
return ok && strings.ToLower(hcp) != "off" && hcp != "0"
_, ok := os.LookupEnv(HCPPackerRegistry)
return ok && !IsHCPDisabled()
}

Loading…
Cancel
Save