Pergunta

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.

Foi útil?

Solução

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` 
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top