mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
Merge pull request #3883 from baude/varlinkbuildcleanup
clean up after remote build
This commit is contained in:
@ -142,7 +142,14 @@ func (i *LibpodAPI) BuildImage(call iopodman.VarlinkCall, config iopodman.BuildI
|
||||
return call.ReplyErrorOccurred(fmt.Sprintf("unable to untar context dir %s", contextDir))
|
||||
}
|
||||
logrus.Debugf("untar of %s successful", contextDir)
|
||||
|
||||
defer func() {
|
||||
if err := os.Remove(contextDir); err != nil {
|
||||
logrus.Errorf("unable to delete file '%s': %q", contextDir, err)
|
||||
}
|
||||
if err := os.RemoveAll(newContextDir); err != nil {
|
||||
logrus.Errorf("unable to delete directory '%s': %q", newContextDir, err)
|
||||
}
|
||||
}()
|
||||
// All output (stdout, stderr) is captured in output as well
|
||||
var output bytes.Buffer
|
||||
|
||||
|
Reference in New Issue
Block a user