Skip to content

Commit

Permalink
fix windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mcalhoun committed Dec 20, 2024
1 parent 262affa commit e07e019
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/utils/glob_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ func GetGlobMatches(pattern string) ([]string, error) {
return strings.Split(existingMatches.(string), ","), nil
}

base, cleanPattern := doublestar.SplitPattern(pattern)
// Conver the pattern to use / as the separatoratorator regardless of platform
allOsSafePattern := filepath.ToSlash(pattern)

base, cleanPattern := doublestar.SplitPattern(allOsSafePattern)
f := os.DirFS(base)

matches, err := doublestar.Glob(f, cleanPattern)
Expand Down

0 comments on commit e07e019

Please sign in to comment.