Describe the bug
Currently the cabal clean command will silently fail if the directory is not a cabal one. This can be confusing in some situations. I've asked people to "cabal clean and try again", and turns out they were performing this in the root directory of the whole project, rather than the directory containing our Haskell code. If cabal clean produced an error in such situations, this would have helped.
To Reproduce
Call cabal clean in a non-cabal directory.
Expected behavior
The same behaviour as e.g. cabal build:
Error: cabal: There is no <pkgname>.cabal package file or cabal.project file.
Describe the bug
Currently the
cabal cleancommand will silently fail if the directory is not a cabal one. This can be confusing in some situations. I've asked people to "cabal cleanand try again", and turns out they were performing this in the root directory of the whole project, rather than the directory containing our Haskell code. Ifcabal cleanproduced an error in such situations, this would have helped.To Reproduce
Call
cabal cleanin a non-cabal directory.Expected behavior
The same behaviour as e.g.
cabal build: