-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
It will be great if the empty file case can be handled when outputting json.
steps to reproduce this issue
❯ touch /tmp/test.txt # create an empty file
❯ pcstat /tmp/test.txt
+---------------+----------------+------------+-----------+---------+
| Name | Size (bytes) | Pages | Cached | Percent |
|---------------+----------------+------------+-----------+---------|
| /tmp/test.txt | 0 | 0 | 0 | NaN |
+---------------+----------------+------------+-----------+---------+
❯ pcstat -json /tmp/test.txt
2025/04/21 13:50:33 JSON formatting failed: json: unsupported value: NaN
Metadata
Metadata
Assignees
Labels
No labels