Skip to content

Commit

Permalink
fix doublestar search using filepath.ToSlash
Browse files Browse the repository at this point in the history
  • Loading branch information
haitham911 committed Dec 28, 2024
1 parent 457c220 commit 84290d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/exec/vendor_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func ReadAndProcessVendorConfigFile(

var configFiles []string
if fileInfo.IsDir() {
foundVendorConfigFile = filepath.ToSlash(foundVendorConfigFile)
matches, err := doublestar.Glob(os.DirFS(foundVendorConfigFile), "*.{yaml,yml}")
if err != nil {
return vendorConfig, false, "", err
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/glob_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func GetGlobMatches(pattern string) ([]string, error) {
if found && existingMatches != nil {
return strings.Split(existingMatches.(string), ","), nil
}

pattern = filepath.ToSlash(pattern)
base, cleanPattern := doublestar.SplitPattern(pattern)
f := os.DirFS(base)

Expand Down

0 comments on commit 84290d8

Please sign in to comment.