(Imported from Trac #934, reported by @kosmikus on 2012-03-15)
Jason Dusek reports:
I am trying to do an automated install of Cabal packages, on EC2
using Ubuntu's cloud-config. The error above was caught in my
Cloud-config sets up a minimal environment prior to running any
tasks. All the package managers I've worked with so far -- gem,
npm, apt -- have no problem with this. It would be nice to find
a way to turn off Cabal's user-centric behaviour.
You may need to hack the code I'm afraid. It gets the home dir as part
of reading the configuration file. Look for where it uses
getAppUserDataDirectory. In particular it's used indirectly in
baseSavedConfig, though it should mostly get overridden if the config
file is found. So additionally you'd need to specify a cabal config
file on the command line to avoid it looking for ~/.cabal/config
Let us know how it goes, we can integrate changes you make.
All Trac links seem to be broken by the recent Haskell.org update.