Connect shared configuration to CLI and server startup
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user