Question

Is there a way to obtain the default cabal config directory, i.e. the path you would specify in ghc-pkg.exe init {path}?

I wanted it in a script to automatically remove that folder for repairing/re-installing ghc.

Thanks.

Était-ce utile?

La solution

Per @user2407038's comments, I obtained the location of the cabal config location with

cabal help | tail -n1

and removed the folder using

rm -rf `cabal help | tail -n1 | xargs dirname` 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top