Browse Source

Merge pull request #3858 from vieux/fix_testexitcode

fix TestExitCode
Victor Vieux 11 years ago
parent
commit
e4b3b391d6
1 changed files with 3 additions and 1 deletions
  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)
 	}()