Finish off the external commands feature
* Remove 'CommandDelegate' in favour of abstracting the fallback in
'commandsRun', there is a new variant 'commdandRunWithFallback' which
takes a continuation
- This restores the modularity between the `Cabal` library and
`cabal-install` as now `Cabal` doesn't need to know anything about
the external command interface.
- Fixes #9403
* Set the $CABAL environment variable to the current executable path
- This allows external commands to be implemented by calling $CABAL,
which is strongly preferred to linking against the Cabal library as
there is no easy way to guantee your tool and `cabal-install` link
against the same `Cabal` library.
- Fixes #9402
* Pass the name of the argument
- This allows external commands to be implemented as symlinks to an
executable, and multiple commands can be interpreted by the same
executable.
- Fixes #9405
* `cabal help <cmd>` is interpreted as `cabal-<cmd> --help` for external
commands.
- This allows the `help` command to also work for external
commands and hence they are better integrated into cabal-install.
- Fixes #9404
The tests are updated to test all these additions.
These features bring the external command interface up to par with the
cargo external command interface.
15 files changed: