From 0a79958afceb566355f59657070df59a5cf992c8 Mon Sep 17 00:00:00 2001 From: Jacob McCann Date: Thu, 11 Feb 2016 12:07:08 -0600 Subject: [PATCH] Add sensitive flag Do not show commands being ran if sensitive is true --- main.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 27c08b3..12cfbab 100644 --- a/main.go +++ b/main.go @@ -11,10 +11,11 @@ import ( ) type terraform struct { - Remote remote `json:"remote"` - Plan bool `json:"plan"` - Vars map[string]string `json:"vars"` - Cacert string `json:"ca_cert"` + Remote remote `json:"remote"` + Plan bool `json:"plan"` + Vars map[string]string `json:"vars"` + Cacert string `json:"ca_cert"` + Sensitive bool `json:"sensitive"` } type remote struct { @@ -49,7 +50,9 @@ func main() { c.Dir = workspace.Path c.Stdout = os.Stdout c.Stderr = os.Stderr - trace(c) + if !vargs.Sensitive { + trace(c) + } err := c.Run() if err != nil {