Isolate pipeline configuration discovery
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
type commandDependencies struct {
|
||||
diagnostics io.Writer
|
||||
resolvePipelineConfigPath func(string) (string, error)
|
||||
loadPipelineConfig func(string, config.PipelineLoadOptions) (*config.PipelineConfig, error)
|
||||
downloadObjectToTemp func(context.Context, storage.ObjectStore, string, string) (string, error)
|
||||
loadSecretsDir func(string) (*configkit.SecretsReport, error)
|
||||
@@ -25,6 +26,9 @@ func normalizeCommandDependencies(deps commandDependencies) commandDependencies
|
||||
if deps.diagnostics == nil {
|
||||
deps.diagnostics = io.Discard
|
||||
}
|
||||
if deps.resolvePipelineConfigPath == nil {
|
||||
deps.resolvePipelineConfigPath = resolvePipelineConfigPath
|
||||
}
|
||||
if deps.loadPipelineConfig == nil {
|
||||
deps.loadPipelineConfig = config.LoadPipelineWithOptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user