Skip to content

Commit 8817b75

Browse files
kaanyaltimergify[bot]
authored andcommitted
enhancement(5235): moved gosec:nolint comment to (#9347)
the correct line (cherry picked from commit c1de40f)
1 parent 8d3c38c commit 8817b75

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/pkg/agent/application/upgrade/step_unpack.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ func unzip(log *logger.Logger, archivePath, dataDir string, flavor string) (Unpa
178178
}
179179
}()
180180

181-
//nolint:gosec // legacy
182-
if _, err = io.Copy(f, rc); err != nil {
181+
if _, err = io.Copy(f, rc); err != nil { //nolint:gosec // legacy
183182
return err
184183
}
185184
}
@@ -424,8 +423,7 @@ func untar(log *logger.Logger, archivePath, dataDir string, flavor string) (Unpa
424423
return UnpackResult{}, errors.New(err, "TarInstaller: creating file "+abs, errors.TypeFilesystem, errors.M(errors.MetaKeyPath, abs))
425424
}
426425

427-
//nolint:gosec // legacy
428-
_, err = io.Copy(wf, tr)
426+
_, err = io.Copy(wf, tr) //nolint:gosec // legacy
429427
if closeErr := wf.Close(); closeErr != nil && err == nil {
430428
err = closeErr
431429
}

0 commit comments

Comments
 (0)