diff options
Diffstat (limited to 'internal/engine/apply.go')
| -rw-r--r-- | internal/engine/apply.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/engine/apply.go b/internal/engine/apply.go index 75248fb..f9cb9ef 100644 --- a/internal/engine/apply.go +++ b/internal/engine/apply.go @@ -80,7 +80,7 @@ func (e *Engine) Apply(ctx context.Context, dp *DirPlan, approved map[string]boo if err := ctx.Err(); err != nil { return result, err } - fr, err := e.applyFile(dp.Dir.Name, c, approved[c.File.Rel], j, run) + fr, err := e.applyFile(ctx, dp.Dir.Name, c, approved[c.File.Rel], j, run) if err != nil { return result, fmt.Errorf("engine: apply: %w", err) } @@ -95,7 +95,7 @@ func (e *Engine) Apply(ctx context.Context, dp *DirPlan, approved map[string]boo } // applyFile carries out (or declines) one file's chain and logs it. -func (e *Engine) applyFile(dirName string, c plan.Chain, approved bool, j *journal.Writer, run string) (FileResult, error) { +func (e *Engine) applyFile(ctx context.Context, dirName string, c plan.Chain, approved bool, j *journal.Writer, run string) (FileResult, error) { rel := c.File.Rel if !approved { @@ -112,7 +112,7 @@ func (e *Engine) applyFile(dirName string, c plan.Chain, approved bool, j *journ // Each step is logged the moment it has run (review M9), not after the // whole chain: a run killed mid-chain must leave what it did undoable. - results, err := apply.ChainLogged(c, func(i int, sr apply.StepResult) error { + results, err := apply.ChainLogged(ctx, c, func(i int, sr apply.StepResult) error { if err := e.logStep(j, run, dirName, rel, i+1, c.Steps[i], sr); err != nil { return unloggedStep(rel, c.Steps[i], sr, err) } |
