fix tests

Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Casey Lee
2020-02-13 11:47:38 -08:00
parent e40ab0145f
commit 09773f7c5c
7 changed files with 160 additions and 30 deletions

View File

@@ -163,7 +163,12 @@ func (rc *RunContext) setupShellCommand(containerSpec *model.ContainerSpec, shel
return err
}
if _, err := tempScript.Write([]byte(run)); err != nil {
_, err = tempScript.WriteString(fmt.Sprintf("PATH=\"%s:${PATH}\"\n", strings.Join(rc.ExtraPath, ":")))
if err != nil {
return err
}
if _, err := tempScript.WriteString(run); err != nil {
return err
}
log.Debugf("Wrote command '%s' to '%s'", run, tempScript.Name())