Skip to content

Commit

Permalink
Merge pull request #851 from aquaproj/fix/use-filepath-splitlist
Browse files Browse the repository at this point in the history
fix: use filepath.SplitList instead of strings.Split
  • Loading branch information
suzuki-shunsuke committed Jun 12, 2022
2 parents a7b5c0f + 6547b39 commit ff56b9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/which/lookpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
"io/fs"
"os"
"path/filepath"
"strings"
)

const proxyName = "aqua-proxy"

func (ctrl *controller) lookPath(envPath, exeName string) string {
for _, p := range strings.Split(envPath, ":") {
for _, p := range filepath.SplitList(envPath) {
bin := filepath.Join(p, exeName)
finfo, err := ctrl.readLink(bin)
if err != nil {
Expand Down

0 comments on commit ff56b9e

Please sign in to comment.