Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There was an unnecessarily complex call to `less` to check if it is available on the path. This actually invoked `less` without a filename and without a piped input. Some versions of `less` (e.g. the default on OS X) allow this, but others (e.g. the version installed by Homebrew) don't. The call to `less` happened in a class initialization, so every call to `alcli` called `less`, which printed an error on stdout that said `Missing filename ("less --help" for help)`. This broke piping to jq. The fix is to use `shutil.which` to find the path to `less`, if it exists. Additionally, this fixes a potential bug where the system isn't `"win32"` and `less` isn't on the path. Previously it would crash trying to invoke `None(help_text)` when printing help text. Now it emits the text directly.
- Loading branch information