Bad error message on cabal run with multiple executable
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Just got this error message:
```
marc@Marcs-M3-Max:~/digitallyinduced/haskell-agent/ > cabal run agent-cli -- --yolo --worktree
Error: [Cabal-7070]
The run command is for running a single executable at once. The target 'agent-cli' refers to the package agent-cli-0.1.0.0 which includes
- executables: agent-cli, agent-telegram and eval-ghci-vs-bash
- test-suites: agent-cli-test
- benchmarks: image-preview-latency-bench and subagent-retention-bench
```
It worked before, but now two more binaries have been added. Apparently now I need to run `cabal run agent-cli:agent-cli`
**Expected behavior**
An error message that hints at the solution:
```
marc@Marcs-M3-Max:~/digitallyinduced/haskell-agent/ > cabal run agent-cli -- --yolo --worktree
Error: [Cabal-7070]
The run command is for running a single executable at once. The target 'agent-cli' refers to the package agent-cli-0.1.0.0 which includes
- executables: agent-cli, agent-telegram and eval-ghci-vs-bash
- test-suites: agent-cli-test
- benchmarks: image-preview-latency-bench and subagent-retention-bench
You need to specify which executable cabal should use. Try one of those:
- cabal run agent-cli:agent-cli -- --yolo --worktree
- cabal run agent-cli:agent-telegram -- --yolo --worktree
- - cabal run agent-cli:eval-ghci-vs-bash -- --yolo --worktree
```
**System information**
- Operating system: macOS
- cabal-install version 3.16.1.0
Contributor guide
Assessment
This issue has not been assessed yet.