cabal in non-existant directory fails #314

bos opened this Issue May 24, 2012 · 1 comment


None yet
2 participants

bos commented May 24, 2012

(Imported from Trac #321, reported by larsv on 2008-08-09)

To reproduce:

mkdir foo ; cd foo ; rmdir ../foo ; cabal install regex-pcre
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Resolving dependencies...
'regex-base-0.93.1' is cached.
cabal: Error: some packages failed to install:
regex-base-0.93.1 failed during the configure step. The exception was:
getCurrentDirectory: does not exist (No such file or directory)
regex-pcre-0.94.1 depends on regex-base-0.93.1 which failed to install.
The first shell-init error occurs even if no package is chosen or any other cabal command is used such as "list" or "upgrade".

However, that seems to be intrinsic to ghc as it shows when running just the ghc binary as well.


gregorycollins commented Jan 28, 2013

As OP points out, if pwd is gone GHC itself won't run. Fortunately there is an easy workaround: change to an existing directory.

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