summaryrefslogtreecommitdiff
path: root/run.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-16 11:59:40 -0700
committerJeff Carr <[email protected]>2019-06-16 11:59:40 -0700
commit5d4ad13b7736b08ae8987dd31706c90f36a0118a (patch)
tree79dfe811740643462713376faf55566e859d6cfb /run.go
parent2e37ee24f7313059815bab656e1b6b17b4772f0e (diff)
track cmd failures
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'run.go')
-rw-r--r--run.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/run.go b/run.go
index 80ad18d..3e24793 100644
--- a/run.go
+++ b/run.go
@@ -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")