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

4
lib.go
View File

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