Skip to content

Commit

Permalink
Recompile task after runDeps to reload envs set by deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hori-ryota committed Aug 9, 2024
1 parent 81ff1cd commit 0b20436
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions task.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ func (e *Executor) RunTask(ctx context.Context, call *ast.Call) error {
if err := e.runDeps(ctx, t); err != nil {
return err
}
if len(t.Deps) > 0 {
// Recompile the task after running dependencies to reload environment variables from dotenv files which may have been set up during the dependency execution
t, err = e.FastCompiledTask(call)
if err != nil {
return err
}
}

skipFingerprinting := e.ForceAll || (!call.Indirect && e.Force)
if !skipFingerprinting {
Expand Down

0 comments on commit 0b20436

Please sign in to comment.