summaryrefslogtreecommitdiff
path: root/internal/askcli/command_write.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-13 14:05:38 +0300
committerPaul Buetow <paul@buetow.org>2026-04-13 14:05:38 +0300
commit604f5aa7603498c4f7cc9a649a86d525b824e6c9 (patch)
tree814adfdd098e1594b74cbda3396b06723a469d3b /internal/askcli/command_write.go
parent00981e0d9cd0bc00c3e21ec0124ffbcc52b4762a (diff)
Release v0.33.0: ask dependency UX and start gatingv0.33.0
Show only task alias IDs on ask info Depends lines. Block ask start until every dependency is completed. Bump version to 0.33.0. Made-with: Cursor
Diffstat (limited to 'internal/askcli/command_write.go')
-rw-r--r--internal/askcli/command_write.go24
1 files changed, 19 insertions, 5 deletions
diff --git a/internal/askcli/command_write.go b/internal/askcli/command_write.go
index d8dbf5b..6887ff7 100644
--- a/internal/askcli/command_write.go
+++ b/internal/askcli/command_write.go
@@ -67,11 +67,25 @@ func (d *Dispatcher) handleStart(ctx context.Context, args []string, stdout, std
_, _ = io.WriteString(stderr, "error: ask start requires an ID or UUID argument\n")
return 1, nil
}
- return d.runSingleTaskCommand(ctx, args[1], stdout, stderr, func(resolved resolvedTaskSelector) []string {
- // uuid:<uuid> is used as the filter so taskwarrior selects the exact task;
- // the action verb follows the filter.
- return []string{"uuid:" + resolved.UUID, "start"}
- })
+ resolved, tasks, code, err := d.resolveTaskSelector(ctx, args[1], stderr)
+ if err != nil {
+ writeInfoError(stderr, err)
+ return code, nil
+ }
+ if code != 0 {
+ return code, nil
+ }
+ if depCode := d.verifyDependenciesCompletedForStart(ctx, tasks[0], stderr); depCode != 0 {
+ return depCode, nil
+ }
+
+ var outBuf bytes.Buffer
+ code, err = d.runner.Run(ctx, []string{"uuid:" + resolved.UUID, "start"}, nil, &outBuf, io.Discard)
+ if code != 0 {
+ return code, err
+ }
+ _, _ = io.WriteString(stdout, FormatSuccess(displayResolvedTaskID(resolved)))
+ return 0, nil
}
func (d *Dispatcher) handleStop(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {