Skip to content

Commit 83f1b21

Browse files
committed
Use context on status commands
1 parent c9a64fe commit 83f1b21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

task.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func RunTask(ctx context.Context, name string) error {
9797
}
9898

9999
if !Force {
100-
upToDate, err := t.isUpToDate()
100+
upToDate, err := t.isUpToDate(ctx)
101101
if err != nil {
102102
return err
103103
}
@@ -140,7 +140,7 @@ func (t *Task) runDeps(ctx context.Context) error {
140140
return nil
141141
}
142142

143-
func (t *Task) isUpToDate() (bool, error) {
143+
func (t *Task) isUpToDate(ctx context.Context) (bool, error) {
144144
if len(t.Status) > 0 {
145145
environ, err := t.getEnviron()
146146
if err != nil {
@@ -149,6 +149,7 @@ func (t *Task) isUpToDate() (bool, error) {
149149

150150
for _, s := range t.Status {
151151
err = execext.RunCommand(&execext.RunCommandOptions{
152+
Context: ctx,
152153
Command: s,
153154
Dir: t.Dir,
154155
Env: environ,

0 commit comments

Comments
 (0)