summaryrefslogtreecommitdiff
path: root/internal/askcli/command_dep.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/askcli/command_dep.go')
-rw-r--r--internal/askcli/command_dep.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/internal/askcli/command_dep.go b/internal/askcli/command_dep.go
index 403afee..0508b39 100644
--- a/internal/askcli/command_dep.go
+++ b/internal/askcli/command_dep.go
@@ -53,7 +53,7 @@ func (d Dispatcher) handleDepAddRm(ctx context.Context, args []string, stdout, s
if code != 0 {
return code, err
}
- io.WriteString(stdout, FormatSuccess(resolved.UUID))
+ io.WriteString(stdout, FormatSuccess(displayResolvedTaskID(resolved)))
return 0, nil
}
@@ -75,7 +75,16 @@ func (d Dispatcher) handleDepList(ctx context.Context, args []string, stdout, st
if len(task.Depends) == 0 {
io.WriteString(stdout, "no dependencies\n")
} else {
- io.WriteString(stdout, strings.Join(task.Depends, "\n")+"\n")
+ aliases, err := ensureTaskAliasesForUUIDs(task.Depends)
+ if err != nil {
+ fmt.Fprintf(stderr, "error: failed to load task aliases: %v\n", err)
+ return 1, nil
+ }
+ ids := make([]string, 0, len(task.Depends))
+ for _, uuid := range task.Depends {
+ ids = append(ids, displayTaskAlias(uuid, aliases))
+ }
+ io.WriteString(stdout, strings.Join(ids, "\n")+"\n")
}
return 0, nil
}