cabal init reverse path order in some cases #1160

Closed
dagit opened this Issue Dec 28, 2012 · 0 comments

Comments

Projects
None yet
2 participants
Collaborator

dagit commented Dec 28, 2012

Rileld in #haskell discovered this. He had a path like this:

$HOME/rpmbuild/RPMS/noarch

And cabal init was saying:

cabal: /home/Rileld/rpmbuild/noarch/RPMS: does not exist

You can see his log here: http://hpaste.org/79924

A simpler test case is this:

mkdir cabal-init-test && cd cabal-init-test && mkdir -p FOO/bar && cabal init # now provide default answers

You will see that cabal init reverses the directories in the path so that it cannot find bar/FOO.

I believe the bug lives in the Heuristics module for init, perhaps in this function: https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Client/Init/Heuristics.hs#L72

@byorgey byorgey closed this in c833d64 Dec 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment