Skip to content

Commit fa8d9de

Browse files
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.3.0 (#223)
* chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.3.0 * fix lint --------- Co-authored-by: bakito-renovate[bot] <205501741+bakito-renovate[bot]@users.noreply.github.com> Co-authored-by: bakito <[email protected]>
1 parent b2c8941 commit fa8d9de

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.toolbox.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TB_SEMVER ?= $(TB_LOCALBIN)/semver
2020
# renovate: packageName=github.com/kubernetes/code-generator
2121
TB_DEEPCOPY_GEN_VERSION ?= v0.33.3
2222
# renovate: packageName=github.com/golangci/golangci-lint/v2
23-
TB_GOLANGCI_LINT_VERSION ?= v2.2.2
23+
TB_GOLANGCI_LINT_VERSION ?= v2.3.0
2424
# renovate: packageName=github.com/goreleaser/goreleaser/v2
2525
TB_GORELEASER_VERSION ?= v2.11.0
2626
# renovate: packageName=github.com/deepmap/oapi-codegen/v2

pkg/fetcher/fetch.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package fetcher
33

44
import (
55
"bytes"
6+
"context"
67
"errors"
78
"fmt"
89
"log"
@@ -181,7 +182,7 @@ func (f *fetcher) deleteOldBinary(tb *types.Toolbox) error {
181182
}
182183

183184
func (f *fetcher) checkUpxAvailable() {
184-
cmd := exec.Command("upx", "--version")
185+
cmd := exec.CommandContext(context.TODO(), "upx", "--version")
185186
_, err := cmd.Output()
186187
if err == nil {
187188
log.Print("🗜️ upx is available")
@@ -440,7 +441,7 @@ func (f *fetcher) validate(targetPath, check string) error {
440441

441442
if check != "" {
442443
// #nosec G204:
443-
cmd := exec.Command(targetPath, strings.Fields(check)...)
444+
cmd := exec.CommandContext(context.TODO(), targetPath, strings.Fields(check)...)
444445
if _, err := cmd.Output(); err != nil {
445446
log.Printf("🚫 Check failed ('%s %s'): %v", targetPath, check, err)
446447
return ValidationError("check failed %v", err)
@@ -528,7 +529,7 @@ func (f *fetcher) copyTool(
528529

529530
func (f *fetcher) upxCompress(targetPath string) {
530531
log.Print("🗜️ Compressing with upx")
531-
cmd := exec.Command("upx", "-q", "-q", targetPath)
532+
cmd := exec.CommandContext(context.TODO(), "upx", "-q", "-q", targetPath)
532533
stdout, err := cmd.Output()
533534
if err == nil {
534535
parts := strings.Fields(string(stdout))

0 commit comments

Comments
 (0)