summaryrefslogtreecommitdiff
path: root/socket_factory.go
diff options
context:
space:
mode:
Diffstat (limited to 'socket_factory.go')
-rw-r--r--socket_factory.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/socket_factory.go b/socket_factory.go
index acdc91b1..c7fe639d 100644
--- a/socket_factory.go
+++ b/socket_factory.go
@@ -54,7 +54,11 @@ func (f *SocketFactory) SpawnWorker(cmd *exec.Cmd) (w *Worker, err error) {
go func(w *Worker) { w.Kill() }(w)
if wErr := w.Wait(); wErr != nil {
- err = errors.Wrap(wErr, err.Error())
+ if _, ok := wErr.(*exec.ExitError); ok {
+ err = errors.Wrap(wErr, err.Error())
+ } else {
+ err = wErr
+ }
}
return nil, errors.Wrap(err, "unable to connect to worker")