node-ledger icon indicating copy to clipboard operation
node-ledger copied to clipboard

Stats returns 'Failed to parse Ledger stats' for files with no postings

Open mariosangiorgio opened this issue 8 years ago • 0 comments

I am (ab)using stats to have ledger validate some files that don't contain any posting. They could be legitimate files. Imagine a file containing only prices or a file containing only a budget. Something like

P 2016/12/31 $ £0.81

or something like

~ Monthly Expenses:House:Rent £1000 Assets

If I invoke ledger stats from the command line I get an empty output, which triggers the error.

Is that necessary?

mariosangiorgio avatar Jan 01 '17 20:01 mariosangiorgio