diff options
| author | Jeff Carr <[email protected]> | 2019-06-16 11:59:40 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-06-16 11:59:40 -0700 |
| commit | 5d4ad13b7736b08ae8987dd31706c90f36a0118a (patch) | |
| tree | 79dfe811740643462713376faf55566e859d6cfb /run.go | |
| parent | 2e37ee24f7313059815bab656e1b6b17b4772f0e (diff) | |
track cmd failures
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'run.go')
| -rw-r--r-- | run.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -8,7 +8,9 @@ import "io" import "fmt" import "os" import "bufio" + import "github.com/svent/go-nbreader" +// import "github.com/davecgh/go-spew/spew" import "log" // import "git.wit.com/wit/log" @@ -110,6 +112,7 @@ func (cmd *Shell) Exec(cmdline string) { // time.Sleep(2 * time.Second) // putting this here doesn't help STDOUT flush() if (err != nil) { + cmd.Fail = true cmd.Error = err log.Println("process.Wait() END err =", err.Error()) } else { @@ -118,6 +121,7 @@ func (cmd *Shell) Exec(cmdline string) { return } +// nonblocking read until file errors func (cmd *Shell) Capture(f *File) { // log.Debugln("nbrREADER() START") |
