Wrong file permissions for version
and last-use.txt
when installed globally (as root)
#294
Labels
bug
Something isn't working
Describe the bug
To Reproduce
Steps to reproduce the behavior:
sudo
) to install and select a specific version (latest
here)You can choose whatever tool you prefer.
Expected behavior
Latest version and usage timestamp (when needed) of OpenTofu is displayed with no warning.
Screenshots
N/A
Environment (please complete the following information):
Additional context
I want to make a system-wide installation of tenv as all those tools would be installed by
root
at a specific version number.The file
/usr/local/share/tenv/OpenTofu/version
should be created world-readable (aka0644
). IMHO opinion this is the right approach.For file
/usr/local/share/tenv/*/*/last-use.txt
I don't have a clear idea.Making it world-readable would solve half of the problem.
Making it world-writable (aka
0666
) would create more problems than solutions.Making that file user-local (inside its
$HOME
) could be an (overly complex?) option to keep the "last use" tracking feature.Sub-optimal workaround would be to use the variable
TENV_QUIET=true
. It would remove the warning indeed, but would also remove any other warning.Adding a new environment variable (like
TENV_SKIP_LAST_USE
) to either skip just the warning or the "last use" tracking feature seems an effective workaround if not a solution.Finally, if the tool is installed by
root
but not run asroot
that step (and related warning) could be simply skipped. This is my favorite solution.The text was updated successfully, but these errors were encountered: