mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-27 02:04:01 -04:00
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:
@@ -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, "<Filtered>", -1)
|
||||
}
|
||||
return conf
|
||||
|
||||
Reference in New Issue
Block a user