Skip to content
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

bug: asdf global ... system needs write access to the entire HOME directory when .tool-versions already exists there #1556

Closed
lestephane opened this issue May 7, 2023 · 1 comment · Fixed by #1592
Labels

Comments

@lestephane
Copy link

lestephane commented May 7, 2023

Describe the Bug

I removed write access on my $HOME a long time ago, to explicitly allowlist the files / directories required by the tools I use, and to avoid the tools that have weird or unenforcable writing habits.

Asdf looks like it needs write access to the home directory because it uses sed -i to modify .tool-versions when .tool-versions exists

$ asdf global python system
sed: couldn't open temporary file /home/lestephane/sedWp3RW1: Permission denied

I'd expect write access to .tool-versions is all asdf needs for me to run this command.

Steps to Reproduce

$ truncate -s 0 $HOME/.tool-versions
$ chmod a-w $HOME
$ asdf global python system
$ asdf global python system
sed: couldn't open temporary file /home/lestephane/sediRUEgd: Permission denied

Expected Behaviour

No error on the second call to asdf global python system

Actual Behaviour

Second call fails

Environment

...
ASDF VERSION:
v0.11.3
...

asdf plugins affected (if relevant)

N/A

@hyperupcall
Copy link
Contributor

When #1351 is fully implemented (right now it isn't), this will be addressed because the global .tool-versions will be in a asdf-specific directory (with only a few files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants