Skip to content

cabal init fails if folder name exists on hackage #6236

Closed
@menelaos

Description

@menelaos

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

  • cabal-install version 3.0.0.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions