mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix: Do not fail on nil error
Commit 5a351d33df
has introduced a
regression due to which copyDir() would fail after closing the archive
successfully
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
parent
c3adea9750
commit
324188e239
1 changed files with 1 additions and 1 deletions
|
@ -753,7 +753,7 @@ func (cr *containerReference) copyDir(dstPath string, srcPath string, useGitIgno
|
|||
defer func(tarFile *os.File) {
|
||||
name := tarFile.Name()
|
||||
err := tarFile.Close()
|
||||
if !errors.Is(err, os.ErrClosed) {
|
||||
if err != nil && !errors.Is(err, os.ErrClosed) {
|
||||
logger.Error(err)
|
||||
}
|
||||
err = os.Remove(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue