1 Commits

Author SHA1 Message Date
679322a8ac Fix everything that you broke retard 2025-04-01 12:12:58 +02:00

View File

@@ -75,7 +75,15 @@ func AssociateFilesWithCommands(files []string, commands []ModifyCommand) (map[s
}
for _, command := range commands {
for _, glob := range command.Files {
matches, err := Matches(file, glob)
_, pattern, err := FigureOutGlobRoot(glob)
if err != nil {
logger.Trace("Failed to figure out glob root for %s: %v", glob, err)
continue
}
file = filepath.Clean(file)
file = strings.ReplaceAll(file, "\\", "/")
matches, err := Matches(file, pattern)
if err != nil {
logger.Trace("Failed to match glob %s with file %s: %v", glob, file, err)
continue