cabal v2-run requires a TARGET when passing flags
Open
blocked: decision-needed
cabal-install: cmd/run
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
The documentation states a TARGET only has to be specified if necessary to disambiguate. However, if you want to pass a flag to an executable it seems TARGET is non-optional.
**To Reproduce**
Steps to reproduce the behavior:
```
# In a project with a single executable which accepts the `-t` flag:
$ cabal v2-run -- -t
```
Please use version-prefixed commands (e.g. `v2-build` or `v1-build`) to avoid ambiguity.
**Expected behavior**
Since there's only a single possible target the documentation suggests it does not need to be specified.
Either the documentation or the functionality should be updated.
Contributor guide
Assessment
This issue has not been assessed yet.