diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index faf11a8e..db46412d 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -5,6 +5,7 @@ import ( "bufio" "bytes" "context" + "errors" "fmt" "io" "io/ioutil" @@ -696,7 +697,7 @@ func (cr *containerReference) copyDir(dstPath string, srcPath string, useGitIgno defer func(tarFile *os.File) { name := tarFile.Name() err := tarFile.Close() - if err != nil { + if !errors.Is(err, os.ErrClosed) { logger.Error(err) } err = os.Remove(name)