mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-26 01:34:00 -04:00
Update IsHCPExplicitelyEnabled logic
This commit is contained in:
committed by
Lucas Bajolet
parent
a427094426
commit
0efd064d29
Vendored
+2
-2
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user