Fix everything that you broke retard

This commit is contained in:
2025-04-01 12:12:58 +02:00
parent 2b973be0c1
commit 679322a8ac

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