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

Allow cache dir to be overridden with NVM_CACHE_DIR #1568

Closed
wants to merge 1 commit into from
Closed

Allow cache dir to be overridden with NVM_CACHE_DIR #1568

wants to merge 1 commit into from

Conversation

wolfgang
Copy link

@wolfgang wolfgang commented Jun 27, 2017

Hello,

I added the possibility to override the cache directory that nvm uses.
I ran into a problem with a combination of electron-compile and electron-mocha, where electron-compile thought the nvm cache is its compile cache, and hilarity ensued. Anyway, I use it like this:

export NVM_DIR="$HOME/.nvm"
export NVM_CACHE_DIR=$NVM_DIR/.nvm_cache
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

Thanks,
Wolfgang

@ljharb
Copy link
Member

ljharb commented Jun 28, 2017

That sounds like a major bug in electron-compile - have you filed it upstream on that repo?

I intentionally didn't make this overrideable; I want 100% of nvm-managed files inside $NVM_DIR.

@ljharb ljharb added the feature requests I want a new feature in nvm! label Jun 28, 2017
@wolfgang
Copy link
Author

Yeah, that is fair. I will actually look into electron-compile.
Understand the wish to keep things under $NVM_DIR .. maybe just make the name of the cache directory configurable? So it would always be $NVM_DIR/$NVM_CACHE_DIR_NAME or something.
Thanks :)

@wolfgang
Copy link
Author

You are right though, it is a major bug in electron-prebuilt-compile. I have filed an issue there. Using a different name for the cache folder will not completely work around it.
Consider this withdrawn. Thanks!

@wolfgang wolfgang closed this Jun 28, 2017
@ljharb
Copy link
Member

ljharb commented Jun 28, 2017

Thanks - can you link to the issue?

@wolfgang
Copy link
Author

I actually submitted a pull request, here: electron-userland/electron-prebuilt-compile#40 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants