Skip to content

hledger silently falls back to default file path if LEDGER_FILE does not exist #2485

@simonmichael

Description

@simonmichael

If LEDGER_FILE is set, but the specified file does not exist, hledger falls back to using the default journal path, eg ~/.hledger.journal. If that file exists, it will run without error, eg hledger files will show that default path. This can be confusing, especially since docs have been recommending hledger files for testing the config (hledger setup is better for this).

I have rewritten the docs at https://hledger.org/dev/hledger.html#setting-ledger_file.

And I think maybe we should report an error when LEDGER_FILE is set to a non-existent path ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.affects4-manyAffects potentially a significant number of users.annoyance3-blockerNew user experience or installability bug. A potential user could fail to get started.cliCommand line parsing, options, arguments and suchlike.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions