Skip to content

Commit 18bfae6

Browse files
committed
stembuild: fix linting
1 parent 77a00ad commit 18bfae6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

stembuild/package_stemcell/ovftool/ovftool.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"path/filepath"
99
)
1010

11-
var stopWalk = errors.New("stop walk") //nolint:staticcheck
11+
var errStopWalk = errors.New("stop walk")
1212

1313
func findExecutable(root, name string) (string, error) {
1414
var file string
@@ -19,19 +19,19 @@ func findExecutable(root, name string) (string, error) {
1919
if !fi.IsDir() && fi.Name() == name {
2020
if s, err := exec.LookPath(path); err == nil {
2121
file = s
22-
return stopWalk
22+
return errStopWalk
2323
}
2424
}
2525
return nil
2626
}
2727
err := filepath.Walk(root, walkFn)
2828
if file == "" {
29-
if err == nil || errors.Is(err, stopWalk) {
29+
if err == nil || errors.Is(err, errStopWalk) {
3030
err = fmt.Errorf("executable file not found in: %s", root)
3131
}
3232
// CEV: this should never happen
33-
if errors.Is(err, stopWalk) {
34-
err = fmt.Errorf("executable file not found in: %s - exec.LookPath error.", root) //nolint:staticcheck
33+
if errors.Is(err, errStopWalk) {
34+
err = fmt.Errorf("executable file not found in: %s - exec.LookPath error", root)
3535
}
3636
return "", &exec.Error{Name: name, Err: err}
3737
}

stembuild/package_stemcell/ovftool/ovftool_windows.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@ func Ovftool(installPaths []string) (string, error) {
6363
return path, nil
6464
}
6565
}
66+
6667
return "", &exec.Error{Name: name, Err: exec.ErrNotFound}
6768
}

0 commit comments

Comments
 (0)