Ticket #934 (new defect)
Opened 15 months ago
cabal seems to require access to user HOME directory
|Reported by:||kosmikus||Owned by:|
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 logs.
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.