fix(bonfire): read the =value forms of the global flags and use the parsed globals in the error block (IN-02, quick-261028-rqd)

This commit is contained in:
Jakub Zych
2026-10-28 20:29:16 +01:00
parent 6294ac4141
commit e34d113c80
6 changed files with 140 additions and 11 deletions

View File

@@ -152,6 +152,9 @@ func NewRootIO(name string, commands []Command, in io.Reader, out, errW io.Write
g = flags.globals()
}
output.setGlobals(g)
if parsed, ok := cmd.Context().Value(parsedGlobalsKey{}).(*parsedGlobals); ok && parsed != nil {
parsed.g, parsed.set = g, true
}
for _, hook := range cfg.hooks {
hook(g)
}