mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
apply logSecretFilter to output from ui.Say
This commit is contained in:
parent
0a74a6ae10
commit
1e5866bd2a
1 changed files with 7 additions and 0 deletions
|
|
@ -236,6 +236,13 @@ func (rw *BasicUi) Say(message string) {
|
|||
rw.l.Lock()
|
||||
defer rw.l.Unlock()
|
||||
|
||||
// Use LogSecretFilter to scrub out sensitive variables
|
||||
for s := range LogSecretFilter.s {
|
||||
if s != "" {
|
||||
message = strings.Replace(message, s, "<sensitive>", -1)
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("ui: %s", message)
|
||||
_, err := fmt.Fprint(rw.Writer, message+"\n")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue