Rename configuration selection to overlays
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/core/config"
|
||||
)
|
||||
|
||||
func loadConfigKit(configPath, profile string, overrides []configkit.Override, opts Options) (*config.LoadedConfig, string, error) {
|
||||
func loadConfigKit(configPath, overlay string, overrides []configkit.Override, opts Options) (*config.LoadedConfig, string, error) {
|
||||
path, err := discoverConfigPath(configPath, opts)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
@@ -19,7 +19,7 @@ func loadConfigKit(configPath, profile string, overrides []configkit.Override, o
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("determine invocation directory: %w", err)
|
||||
}
|
||||
loaded, err := config.Load(path, config.LoadOptions{Profile: profile, Overrides: overrides, InvocationDirectory: workingDirectory})
|
||||
loaded, err := config.Load(path, config.LoadOptions{Overlay: overlay, Overrides: overrides, InvocationDirectory: workingDirectory})
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
@@ -31,7 +31,7 @@ func writeConfigLoadError(output io.Writer, err error) {
|
||||
if errors.As(err, &loadError) {
|
||||
if writeErr := configkit.WriteDiagnostics(output, loadError.Diagnostics()); writeErr == nil {
|
||||
// ConfigKit's locations contain source IDs. Keep its renderer and
|
||||
// supply the acquired-source legend so imported/profile errors can
|
||||
// supply the acquired-source legend so imported/overlay errors can
|
||||
// be traced to a file. Quoting also escapes terminal controls.
|
||||
for _, source := range loadError.Sources() {
|
||||
label := source.Path
|
||||
|
||||
Reference in New Issue
Block a user