mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-20 00:10:04 -05:00
Update IsHCPExplicitelyEnabled logic
This commit is contained in:
parent
a427094426
commit
0efd064d29
1 changed files with 2 additions and 2 deletions
4
internal/registry/env/env.go
vendored
4
internal/registry/env/env.go
vendored
|
|
@ -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…
Reference in a new issue