Fix "assignment to entry in nil map" on empty YAML config files

Fixes #14074
This commit is contained in:
Bjørn Erik Pedersen
2025-10-22 11:06:54 +02:00
parent 0ccbc63ab8
commit 0579afc3c5
5 changed files with 67 additions and 9 deletions
+2
View File
@@ -19,6 +19,7 @@ import (
"fmt"
"os"
"path/filepath"
"runtime/debug"
"strings"
"github.com/gobwas/glob"
@@ -44,6 +45,7 @@ func LoadConfig(d ConfigSourceDescriptor) (configs *Configs, err error) {
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("failed to load config: %v", r)
debug.PrintStack()
}
}()