clean up debug

master
Paulo Simão 2021-11-02 22:11:22 -03:00
parent 5ff5942b4f
commit 59a4e22ee8
1 changed files with 3 additions and 1 deletions

2
lib.go
View File

@ -281,7 +281,9 @@ func Exec(str string, opts ...*Opts) ([]*exec.Cmd, error) {
if err != nil { if err != nil {
fqncmd = filepath.Join(cmdwd, l.Tokens[0]) fqncmd = filepath.Join(cmdwd, l.Tokens[0])
} }
if opt.Debug {
log.Printf("Will call CMD: %s", fqncmd) log.Printf("Will call CMD: %s", fqncmd)
}
cmd := exec.Command(fqncmd, l.Tokens[1:]...) cmd := exec.Command(fqncmd, l.Tokens[1:]...)
cmd.Stdout = log.Writer() cmd.Stdout = log.Writer()
cmd.Stderr = log.Writer() cmd.Stderr = log.Writer()