Describe the bug
If cabal init is run inside a folder that has the same name as a package on hackage, cabal throws an error: Error: no package name provided.
To Reproduce
mkdir lens
cd lens
cabal init
This also happens for a hidden folder (.lens).
It does not happen if the folder name does not exist on hackage:
mkdir doesnotexistonhackage
cd doesnotexistonhackage
cabal init
Expected behavior
I would except cabal to at least give a more precise error message or better proceed with only a warning.
System information
I second this. I just got this error as well and it's very confusing and gives no indication of what is actually going on
I was just bit by this one and if I hadn't found the issue googling it could have wasted a bit of time.
This appears to be a regression; previously cabal init would complain to you about this during the interactive questionnaire:
This package name is already used by another package on hackage. Do you want to choose a different name? [default: y]
Most helpful comment
This appears to be a regression; previously
cabal initwould complain to you about this during the interactive questionnaire: