setup-node-nvm icon indicating copy to clipboard operation
setup-node-nvm copied to clipboard

NVM directory already exists

Open kceb opened this issue 4 years ago • 4 comments

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.

kceb avatar Mar 23 '20 21:03 kceb

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.

kceb avatar Apr 02 '20 00:04 kceb

This would probably work fine if it only set $NVM_DIR if it wasn't already set?

ljharb avatar Nov 09 '20 22:11 ljharb

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.

dcodeIO avatar Nov 10 '20 01:11 dcodeIO

Right, but i think the ideal/goal is not to install an extra nvm/node at all - ie, to reuse the existing one.

ljharb avatar Nov 10 '20 02:11 ljharb