Skip to content

Commit

Permalink
log all exec
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario L Gutierrez committed Feb 21, 2015
1 parent 2ef40a4 commit 651893c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ func (gcmd *command) run() (output string, err error) {
return
}

if verbose {
util.Debug("#", "%s\n", gcmd.commandstr)
}
err = cmd.Run()
if gcmd.captureOutput {
return gcmd.recorder.String(), err
Expand All @@ -76,6 +79,9 @@ func (gcmd *command) runAsync() (err error) {
waitExit = true
waitgroup.Add(1)
go func() {
if verbose {
util.Debug("#", "%s\n", gcmd.commandstr)
}
err = cmd.Start()
if err != nil {
return
Expand Down
8 changes: 0 additions & 8 deletions exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strings"

"github.com/mgutz/str"
"gopkg.in/godo.v1/util"
)

// In is used by Bash, Run and Start to set the working directory
Expand Down Expand Up @@ -84,10 +83,6 @@ func bash(captureOutput bool, script string, wd []In) (output string, err error)
commandstr: script,
}

if verbose {
util.Debug("$", "%s\n", script)
}

return gcmd.run()
}

Expand All @@ -107,9 +102,6 @@ func run(captureOutput bool, commandstr string, wd []In) (output string, err err
commandstr: commandstr,
}

if verbose {
util.Debug("$", "%s\n", commandstr)
}
return cmd.run()
}

Expand Down

0 comments on commit 651893c

Please sign in to comment.