From c501574753672308463c75b1458daa857a034b81 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Tue, 7 Mar 2017 09:44:16 -0700 Subject: [PATCH] fix overlooked rename of struct method receiver var --- plugins/common/common.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/common/common.go b/plugins/common/common.go index ab3488532..6ea751976 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -33,17 +33,17 @@ func NewShellCmd(command string) *ShellCmd { } // Execute is a lightweight wrapper around exec.Command -func (dc *ShellCmd) Execute() bool { +func (sc *ShellCmd) Execute() bool { env := os.Environ() - for k, v := range dc.Env { + for k, v := range sc.Env { env = append(env, fmt.Sprintf("%s=%s", k, v)) } - dc.Command.Env = env - if dc.ShowOutput { - dc.Command.Stdout = os.Stdout - dc.Command.Stderr = os.Stderr + sc.Command.Env = env + if sc.ShowOutput { + sc.Command.Stdout = os.Stdout + sc.Command.Stderr = os.Stderr } - err := dc.Command.Run() + err := sc.Command.Run() if err != nil { return false }