Connect shared configuration to CLI and server startup

This commit is contained in:
2026-11-23 03:27:17 +00:00
parent 69ef533d7e
commit b6693fde73
11 changed files with 206 additions and 67 deletions

View File

@@ -75,10 +75,13 @@ func loadApplication(ctx context.Context, selection ckconfig.Selection, input ap
if err := ctx.Err(); err != nil {
return nil, err
}
result, err := appconfig.Load(appconfig.LoadOptions{
result, report, err := appconfig.Load(appconfig.LoadOptions{
Path: selection.Config.Value, Explicit: selection.Config.Set, Overlay: selection.Overlay.Value,
Overrides: append(namedApplicationOverrides(input), selection.Overrides...),
})
if sink, ok := ctx.Value(bootstrapSinkKey{}).(bootstrapSink); ok {
sink(report, err)
}
if err != nil {
return nil, err
}
@@ -107,6 +110,5 @@ func loadEngine(ctx context.Context, selection ckconfig.Selection, input applica
if err != nil {
return nil, err
}
settings := appconfig.Settings(result.Config)
return newEngine(settings)
return newEngine(result)
}