Closed
Description
If you sit in a local project directory and cabal install
a remote package, you cannot give its version suffix unless you also pass --ignore-project
.
Reproducer:
- change to a cabal project root
cabal install fix-whitespace-0.0.8
fails:Error: cabal: No targets given and there is no package in the current directory. Use the target 'all' for all packages in the project or specify packages or components by name or location.
cabal install fix-whitespace
succeedscabal install --ignore-project fix-whitespace-0.0.8
also succeeds
In the wild: https://github.com/haskell/cabal/runs/7509048343?check_suite_focus=true#step:6:1
Run cabal install --install-method=copy --installdir=$HOME/.local/bin fix-whitespace-0.0.8
cabal: No targets given and there is no package in the current directory. Use
the target 'all' for all packages in the project or specify packages or
components by name or location.