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: <Filtered><<Filtered>F<Filtered>i... Don't do that.
This commit is contained in:
parent
350a5f8cad
commit
76c8cfd498
|
@ -18,6 +18,9 @@ import (
|
||||||
func ScrubConfig(target interface{}, values ...string) string {
|
func ScrubConfig(target interface{}, values ...string) string {
|
||||||
conf := fmt.Sprintf("Config: %+v", target)
|
conf := fmt.Sprintf("Config: %+v", target)
|
||||||
for _, value := range values {
|
for _, value := range values {
|
||||||
|
if value == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
conf = strings.Replace(conf, value, "<Filtered>", -1)
|
conf = strings.Replace(conf, value, "<Filtered>", -1)
|
||||||
}
|
}
|
||||||
return conf
|
return conf
|
||||||
|
|
Loading…
Reference in New Issue