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

make cache dir configurable #715

Closed
UiP9AV6Y opened this issue Mar 12, 2022 · 2 comments · Fixed by #717
Closed

make cache dir configurable #715

UiP9AV6Y opened this issue Mar 12, 2022 · 2 comments · Fixed by #717

Comments

@UiP9AV6Y
Copy link
Contributor

currently CACHE_DIR is hardcoded to
use $N_PREFIX/n/versions as persistence
layer for node versions.

we use n in a CI context and manage
the node versions with a privileged user
while the CI user is only allowed to
switch between existing/cached versions.

currently we solved this with $N_PREFIX
being owned by the CI user and
$N_PREFIX/n being owned by the
privileged user to prevent
writing/downloading new versions during
CI jobs.

it should probably be sufficient to
make CACHE_DIR configurable just like
N_PREFIX, defaulting to the currently
hardcoded value (and also rename it to
N_CACHE_DIR to be unambiguous)

p.s.: yes i know, you can bypass this
restriction by setting N_PREFIX to a
different location, but that is a
different problem.

@shadowspawn
Copy link
Collaborator

It feels an indirect partial solution to your stated goals (as you say!), but separating the cache location and the install location seems fairly reasonable for flexibility in configuration. They are different concerns.

@shadowspawn
Copy link
Collaborator

Released in v8.1.0. Thanks for your contributions. 😄

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

Successfully merging a pull request may close this issue.

2 participants