(Imported from Trac #321, reported by larsv on 2008-08-09)
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
'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.
However, that seems to be intrinsic to ghc as it shows when running just the ghc binary as well.
As OP points out, if pwd is gone GHC itself won't run. Fortunately there is an easy workaround: change to an existing directory.