Skip to content

Ommitting the newline at EOF confuses ledger  #516

Closed
@cpitclaudel

Description

Here's a simple repro:

$ printf '2017/01/01 * Stuff\n  A  $1\n  B' | ledger --pedantic -f - bal
While parsing file "", line 3:
While balancing transaction from streamed input:
Unbalanced remainder is:
                  $1
Amount to balance against:
                  $1
Error: Transaction does not balance

Contrast with this:

$ printf '2017/01/01 * Stuff\n  A  $1\n  B\n' | ledger --pedantic -f - bal
                  $1  A
                 $-1  B
--------------------
                   0

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions