summaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-12-23 14:43:47 +0300
committerWolfy-J <[email protected]>2019-12-23 14:43:47 +0300
commitc7b0a4a81827284f7565c56aa476eea34fb6382f (patch)
treeee30e93169c37fb058fbe55af6b3f954eabd9646 /worker.go
parent7f694966730f6dac09d0d0ea3bf51276b8e4dfe4 (diff)
- test fixes
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/worker.go b/worker.go
index a95a80b3..32f63554 100644
--- a/worker.go
+++ b/worker.go
@@ -105,7 +105,9 @@ func (w *Worker) Wait() error {
if runtime.GOOS != "windows" {
// windows handles processes and close pipes differently,
// we can ignore wait here as process.Wait() already being handled above
- w.cmd.Wait()
+ if err := w.cmd.Wait(); err != nil {
+ return err
+ }
}
if w.endState.Success() {
@@ -214,10 +216,16 @@ func (w *Worker) start() error {
defer w.mu.Unlock()
if w.rl != nil {
- w.rl.Close()
+ err := w.rl.Close()
+ if err != nil {
+ w.err.lsn(EventWorkerError, WorkerError{Worker: w, Caused: err})
+ }
}
- w.err.Close()
+ err := w.err.Close()
+ if err != nil {
+ w.err.lsn(EventWorkerError, WorkerError{Worker: w, Caused: err})
+ }
}
}()