Carry dependencies through pipeline commands

This commit is contained in:
2026-09-05 17:53:56 +00:00
parent c3307ab5fb
commit dd905c4daa
13 changed files with 153 additions and 89 deletions

View File

@@ -18,6 +18,11 @@ import (
// Plan validates configuration and prints a read-only execution preview.
func Plan(ctx context.Context, args []string, out io.Writer) error {
return planWithDependencies(ctx, args, out, commandDependencies{})
}
func planWithDependencies(ctx context.Context, args []string, out io.Writer, deps commandDependencies) error {
deps = normalizeCommandDependencies(deps)
request, err := parseBoundedRunRequest("plan", args, out)
if err != nil {
if errors.Is(err, flag.ErrHelp) {
@@ -26,7 +31,7 @@ func Plan(ctx context.Context, args []string, out io.Writer) error {
return err
}
flags := request.Config
loaded, err := loadCommandConfig(ctx, flags.pipelinePath, flags.campaignPath, flags.campaignFilePath, flags.sessionPath, flags.sessionOptions())
loaded, err := loadCommandConfigWithDependencies(ctx, flags.pipelinePath, flags.campaignPath, flags.campaignFilePath, flags.sessionPath, flags.sessionOptions(), deps)
if err != nil {
return fmt.Errorf("plan: %w", err)
}