Skip to content

ghc-pkg insists on having HOME environment variable set

Even in cases when it should not need it, ghc-pkg still fails if HOME is unset:

% env - ~/bin/ghc-pkg --global list
ghc-pkg.bin: HOME: getEnv: does not exist (no environment variable)

Yet, if I just set the variable to a dummy value, ghc-pkg is happy:

% env - HOME=/non-existent ~/bin/ghc-pkg --global list
.../lib/ghc-6.8.2/package.conf:
    Cabal-1.2.3.0, HUnit-1.2.0.0, QuickCheck-1.1.0.0, array-0.1.0.0,
    base-3.0.1.0, bytestring-0.9.0.1, cgi-3001.1.5.1,
    containers-0.1.0.1, directory-1.0.0.0, fgl-5.4.1.1,
...
Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information