Accept and protect processing glossary files
This commit is contained in:
@@ -27,7 +27,11 @@ type engineEntry struct {
|
||||
engine *pk.Engine
|
||||
}
|
||||
|
||||
func loadApplication(ctx context.Context, selection ckconfig.Selection, _ struct{}, _ *invocationState) (*ck.Result[appconfig.Config], error) {
|
||||
type acquisitionInput struct {
|
||||
GlossaryFiles []string
|
||||
}
|
||||
|
||||
func acquireApplication(ctx context.Context, selection ckconfig.Selection, input acquisitionInput) (*appconfig.Acquisition, error) {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -40,11 +44,16 @@ func loadApplication(ctx context.Context, selection ckconfig.Selection, _ struct
|
||||
} else {
|
||||
source = ck.SearchConfig("audita", ck.Searches(ck.WorkingDirectory(), ck.UserConfigDirectory(), ck.UnixSystemDirectories()))
|
||||
}
|
||||
loaded, report, err := appconfig.Load(ctx, ck.Input{Source: source}, appconfig.Options{Overlay: selection.Overlay.Value, Overrides: selection.Overrides})
|
||||
loaded, report, err := appconfig.Load(ctx, ck.Input{Source: source}, appconfig.Options{Overlay: selection.Overlay.Value, Overrides: selection.Overrides, GlossaryFiles: input.GlossaryFiles})
|
||||
return loaded, reportBootstrap(ctx, report, err)
|
||||
}
|
||||
|
||||
func loadApplication(ctx context.Context, selection ckconfig.Selection, _ struct{}, _ *invocationState) (*ck.Result[appconfig.Config], error) {
|
||||
loaded, err := acquireApplication(ctx, selection, acquisitionInput{})
|
||||
if err != nil {
|
||||
return nil, reportBootstrap(ctx, report, err)
|
||||
return nil, err
|
||||
}
|
||||
return loaded.Result, reportBootstrap(ctx, report, nil)
|
||||
return loaded.Result, nil
|
||||
}
|
||||
|
||||
func loadPromptEngine(ctx context.Context, selection ckconfig.Selection, input struct{}, state *invocationState) (*pk.Engine, error) {
|
||||
|
||||
Reference in New Issue
Block a user