Severity
major
Summary
Every export subcommand emits the literal string null (plus newline) on stdout when there is no data in the window. The contract (and the CLI's own prime text) say empty results must be [] so callers can pipe to jq without special-casing.
Reproduce
$ withings-export activity --since 2030-01-01 --json
null
$ withings-export sleep --since 2030-01-01 --json
null
$ withings-export workouts --since 2030-01-01 --json
null
$ withings-export measurements --since 2030-01-01 --json
null
$ withings-export measurements --types 999 --since 30d --json
null
jq 'length' <<< null errors: jq: error: null (null) has no length.
Expected
Empty results print []\n, exit 0. Already fixed on main in commit b580683 (printJSON reflects on nil slices), but missing from the v0.2.1 release. See #14.
Severity
major
Summary
Every export subcommand emits the literal string
null(plus newline) on stdout when there is no data in the window. The contract (and the CLI's ownprimetext) say empty results must be[]so callers can pipe tojqwithout special-casing.Reproduce
jq 'length' <<< nullerrors:jq: error: null (null) has no length.Expected
Empty results print
[]\n, exit 0. Already fixed onmainin commitb580683(printJSONreflects on nil slices), but missing from the v0.2.1 release. See #14.