setup-node-nvm
setup-node-nvm copied to clipboard
NVM directory already exists
Getting the following error on macOS but not ubuntu:
fatal: destination path '/Users/runner/.nvm' already exists and is not an empty directory.
I can rm -rf that directory before the iOS step, but was wondering why it is happening suddenly. To my knowledge, we didn't cache that directory.
Looks like github added nvm to it's macOS containers.
I think to resolve this, this package could check to see if an nvm install already exists.
This would probably work fine if it only set $NVM_DIR
if it wasn't already set?
A while ago I changed the install directory from $HOME/.nvm to $HOME/mynvm (see). Looks a bit silly, but should work around the problem by replacing any potentially existing nvm install for the course of the workflow run.
Right, but i think the ideal/goal is not to install an extra nvm/node at all - ie, to reuse the existing one.