-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stack ghci
fails with permissions error for multiple users
#5203
Comments
I can write a pull request to fix this, I just want to make sure that my suggested solution (using ~/.cache) is acceptable. I would probably have to add a dependency on https://hackage.haskell.org/package/xdg-basedir if that's ok. |
We have run into this as well. *sigh* A workaround is to set the environment variable The |
Can you please give an example of how to do ? |
I just ran into this as well, in a case where a collaborator and I were both trying to use |
Argh. I just ran into this issue at work. It's been 3 years and it's still broken. Can't you at least include the user id in the directory name, like |
@mauke, I will have a stab at fixing this. |
Fix #5203 Put GHCi configuration scripts in a user-specific location
@mauke, I think the version of Stack in the |
General summary/comments
stack ghci
creates the directory/tmp/haskell-stack-ghci
if it doesn't exist, which it uses to store ghci-script files that load the appropriate modules for each project. If multiple users try to usestack ghci
, only the first user to do so will succeed, because/tmp/haskell-stack-ghci
will be owned by them. Any other user who tries to runstack ghci
will get a permissions error. This could be fixed by using a user-specific temporary directory instead (e.g. ~/.cache). The relevant code is here:stack/src/Stack/Ghci.hs
Lines 437 to 450 in 605f74d
Steps to reproduce
a
andb
, and install stack in each of their home directories.stack ghci
as usera
in their home directory.b
.stack ghci
as userb
in their home directory.Expected
GHCi should start normally in user
b
's global project.Actual
Starting GHCi fails with:
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: