Skip to content

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

@DTTerastar

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

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
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions