Skip to content

workouts show --format json prints text 'No workouts found' instead of [] on empty result #23

Description

@DTTerastar

Command

```
liftoff-export workouts show 2024-01-01 --format json
liftoff-export workouts show today --format json
```

Actual output (stdout, exit 0)

```
No workouts found for January 1, 2024.
```

Expected output

Empty JSON array `[]` — per the quantcli contract: "Empty = exit 0, empty output (`[]` for JSON)". The current text output is invalid JSON and breaks any downstream pipe to `jq` or other parsers.

```
$ liftoff-export workouts show today --format json | jq .
parse error: Invalid numeric literal at line 1, column 3
```

Severity

blocker

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:format--format markdown/json/csv and codec behavior.kind:bugObserved behavior diverges from documented behavior.priority:highReproducible bug that breaks a documented contract surface, or a regression on main.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions