internal/pkg: close gzip reader on success

The Close method panics otherwise.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-26 07:06:38 +09:00
parent fdc8a8419b
commit 67d592c337

View File

@@ -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
}