fix overlooked rename of struct method receiver var

This commit is contained in:
Michael Hobbs committed 2017-03-20 09:16:49 -07:00
1 parent f0efdd2ed4
commit c501574753
1 file changed
+7 -7
+7 -7
View File
@@ -33,17 +33,17 @@ func NewShellCmd(command string) *ShellCmd {
} }
// Execute is a lightweight wrapper around exec.Command // Execute is a lightweight wrapper around exec.Command
func (dc *ShellCmd) Execute() bool { func (sc *ShellCmd) Execute() bool {
env := os.Environ() env := os.Environ()
for k, v := range dc.Env { for k, v := range sc.Env {
env = append(env, fmt.Sprintf("%s=%s", k, v)) env = append(env, fmt.Sprintf("%s=%s", k, v))
} }
dc.Command.Env = env sc.Command.Env = env
if dc.ShowOutput { if sc.ShowOutput {
dc.Command.Stdout = os.Stdout sc.Command.Stdout = os.Stdout
dc.Command.Stderr = os.Stderr sc.Command.Stderr = os.Stderr
} }
err := dc.Command.Run() err := sc.Command.Run()
if err != nil { if err != nil {
return false return false
} }