From e07e0191eac311deacbb833fd3c6e0e826e87f75 Mon Sep 17 00:00:00 2001 From: Matt Calhoun Date: Fri, 20 Dec 2024 12:58:30 -0500 Subject: [PATCH] fix windows paths --- pkg/utils/glob_utils.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/utils/glob_utils.go b/pkg/utils/glob_utils.go index 268473c53..9454bb664 100644 --- a/pkg/utils/glob_utils.go +++ b/pkg/utils/glob_utils.go @@ -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)