summaryrefslogtreecommitdiff
path: root/internal/askcli
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-22 22:29:49 +0200
committerPaul Buetow <paul@buetow.org>2026-03-22 22:29:49 +0200
commitf1cc2adc3bbbf08c1c08444653d40cfb8f38c305 (patch)
tree4e6055c42390434a52595bf58ddb52da4b054644 /internal/askcli
parenta0f7ee1cd4b0833ff45b94e2a35c60227e6ec1e3 (diff)
ask: fix filter argument ordering for list/all/ready commandsv0.25.4
Filters like +tag must come before the 'export' action in task commands. Previously filters were appended after 'export' causing 'ask list +integrationtest' to fail.
Diffstat (limited to 'internal/askcli')
-rw-r--r--internal/askcli/command_list.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/askcli/command_list.go b/internal/askcli/command_list.go
index 82b7ff5..64ec2fb 100644
--- a/internal/askcli/command_list.go
+++ b/internal/askcli/command_list.go
@@ -9,13 +9,14 @@ import (
)
func (d Dispatcher) handleList(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
- filterArgs := []string{"status:pending", "export"}
+ filterArgs := []string{"status:pending"}
for _, arg := range args[1:] {
if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") ||
strings.HasPrefix(arg, "+") || arg == "started" {
filterArgs = append(filterArgs, arg)
}
}
+ filterArgs = append(filterArgs, "export")
var outBuf bytes.Buffer
code, err := d.runner.Run(ctx, filterArgs, nil, &outBuf, stderr)
if code != 0 {
@@ -38,13 +39,14 @@ func (d Dispatcher) handleList(ctx context.Context, args []string, stdout, stder
}
func (d Dispatcher) handleAll(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
- filterArgs := []string{"export"}
+ filterArgs := []string{}
for _, arg := range args[1:] {
if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") ||
strings.HasPrefix(arg, "+") || arg == "started" {
filterArgs = append(filterArgs, arg)
}
}
+ filterArgs = append(filterArgs, "export")
var outBuf bytes.Buffer
code, err := d.runner.Run(ctx, filterArgs, nil, &outBuf, stderr)
if code != 0 {
@@ -67,13 +69,14 @@ func (d Dispatcher) handleAll(ctx context.Context, args []string, stdout, stderr
}
func (d Dispatcher) handleReady(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
- filterArgs := []string{"+READY", "export"}
+ filterArgs := []string{"+READY"}
for _, arg := range args[1:] {
if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") ||
strings.HasPrefix(arg, "+") || arg == "started" {
filterArgs = append(filterArgs, arg)
}
}
+ filterArgs = append(filterArgs, "export")
var outBuf bytes.Buffer
code, err := d.runner.Run(ctx, filterArgs, nil, &outBuf, stderr)
if code != 0 {