hledger-flow icon indicating copy to clipboard operation
hledger-flow copied to clipboard

hledger-flow does not 'see' hledger despite it being present in the PATH as a symlinked executable

Open lestephane opened this issue 3 years ago • 3 comments

To Reproduce

$ cd import
$ export PATH=".:$PATH"
$ ln -s ~/.local/bin/hledger-flow-async-batches-793f882bb22ac7b89a98077ee95b3464bbc5c0e0 hledger-flow
$ ln -s ~/.local/bin/hledger-32b42a6c8082e2567a73365d48696354f895c2f9 hledger
$ hledger-flow import
Unable to find hledger in your path. # <<- no time to investigate that one, it should have worked
You need to either install hledger, or add it to your PATH, or provide the path to an hledger executable.
$ which hledger
./hledger
$ hledger --version
hledger 1.21.99

lestephane avatar Apr 24 '21 12:04 lestephane

You need to either install hledger, or add it to your PATH, or provide the path to an hledger executable.

I need more info on how to do that, as a temporary workaround...

lestephane avatar Apr 24 '21 12:04 lestephane

You need to either install hledger, or add it to your PATH, or provide the path to an hledger executable.

I need more info on how to do that, as a temporary workaround...

I don't know why it doesn't see hledger in the custom path, but here's how to explicitly specify the path.

First start by checking the available options with --help:

hledger-flow --help
An hledger workflow focusing on automated statement import and classification:
https://github.com/apauley/hledger-flow#readme

Usage: hledger-flow ([-v|--verbose] [-H|--hledger-path HLEDGER-PATH]
                      [--show-options] [--batch-size SIZE] [--sequential]
                      (import | report) |
                      (-V|--version))

Here's an example of using --hledger-path:

hledger-flow --show-options --hledger-path ~/.local/bin/hledger-32b42a6 import

apauley avatar Apr 24 '21 14:04 apauley

hmm somehow I did not see the --hledger-path option. It was staring me in the face. Long day

lestephane avatar Apr 24 '21 18:04 lestephane