From 76c8cfd498e35d9569c6e69403228da9248ed7ff Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Mon, 18 May 2015 15:13:01 -0700 Subject: [PATCH] common: don't scrub "" If the access_key or secret_key were loaded from somewhere other than the packer file then ScrubConfig can get called to scrub "" and "". This results in very long output: <Fi... Don't do that. --- common/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/config.go b/common/config.go index 72b3bdd27..d821faf35 100644 --- a/common/config.go +++ b/common/config.go @@ -18,6 +18,9 @@ import ( func ScrubConfig(target interface{}, values ...string) string { conf := fmt.Sprintf("Config: %+v", target) for _, value := range values { + if value == "" { + continue + } conf = strings.Replace(conf, value, "", -1) } return conf