Explorar el Código

Merge pull request #3858 from vieux/fix_testexitcode

fix TestExitCode
Victor Vieux hace 11 años
padre
commit
e4b3b391d6
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      execdriver/lxc/driver.go

+ 3 - 1
execdriver/lxc/driver.go

@@ -155,7 +155,9 @@ func (d *driver) Run(c *execdriver.Command, startCallback execdriver.StartCallba
 	)
 	go func() {
 		if err := c.Wait(); err != nil {
-			waitErr = err
+			if _, ok := err.(*exec.ExitError); !ok { // Do not propagate the error if it's simply a status code != 0
+				waitErr = err
+			}
 		}
 		close(waitLock)
 	}()