-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Description
While trying to make spago test work in a nixpkgs derivation, I ran into this issue:
[error] Directory "/" is not accessible. Permissions {readable = True, writable = False, executable = False, searchable = True}
This happens because, when nixpkgs builds a derivation, it sets $HOME to a non-existent location:
2020-12-14 14:15:37.905847: [debug] Running `getGlobalCacheDir`
@(src/Spago/RunEnv.hs:44:7)
2020-12-14 14:15:37.906423: [debug] Directory "/homeless-shelter/.cache/spago" does not exist, creating...
@(src/Spago/Prelude.hs:189:7)
2020-12-14 14:15:37.906462: [debug] Directory "/homeless-shelter/.cache" does not exist, creating...
@(src/Spago/Prelude.hs:189:7)
2020-12-14 14:15:37.906487: [debug] Directory "/homeless-shelter" does not exist, creating...
@(src/Spago/Prelude.hs:189:7)
2020-12-14 14:15:37.906559: [error] Directory "/" is not accessible. Permissions {readable = True, writable = False, executable = False, searchable = True}
@(src/Spago/Prelude.hs:125:13)
Note that spago tries to do this even when spago test is run with --global-cache=skip!
So I think there are 2 issues here:
- Don't go any further up the path than
$HOMEwhen trying to create the global cache directory. --global-cache=skipshould not try to create$HOME/.cache/spagoat all.
Metadata
Metadata
Assignees
Labels
No labels