Update to address review feedback

This commit is contained in:
Wilken Rivera
2022-02-14 11:06:31 -05:00
committed by Wilken Rivera
parent a6e0ddd4f4
commit ed441c1806
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ func (m *Meta) GetConfig(cla *MetaArgs) (packer.Handler, int) {
// This is an internal-only method that should be called by commands that don't have
// a different mode when handling legacy JSON templates; mainly build, validate.
func DisplayLegacyConfigWarning(ui packersdk.Ui) {
if v, ok := os.LookupEnv("PACKER_LEGACY_MODE"); ok && strings.ToLower(v) == "on" {
if v := os.Getenv("PACKER_LEGACY_MODE"); strings.ToLower(v) == "on" {
return
}
+1 -1
View File
@@ -194,7 +194,7 @@ func init() {
// By default PACKER_LEGACY_MODE=auto to enable automatic loading of vendored plugins.
// In preparation for removing vendored plugins entirely we are providing users a flag to
// to control if vendored plugins should be loaded or not.
if v, ok := os.LookupEnv("PACKER_LEGACY_MODE"); ok && strings.ToLower(v) == "off" {
if v := os.Getenv("PACKER_LEGACY_MODE"); strings.ToLower(v) == "off" {
return
}