aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg')
-rw-r--r--internal/pkg/tar.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/pkg/tar.go b/internal/pkg/tar.go
index 59c44cbf..c56176b1 100644
--- a/internal/pkg/tar.go
+++ b/internal/pkg/tar.go
@@ -97,12 +97,11 @@ func (a *tarArtifact) Cure(t *TContext) (err error) {
}
defer func(f io.ReadCloser) {
- closeErr := tr.Close()
if err == nil {
- err = closeErr
+ err = tr.Close()
}
- closeErr = f.Close()
+ closeErr := f.Close()
if err == nil {
err = closeErr
}