dcodeIO / setup-node-nvm

Set up your GitHub Actions workflow with a specific version of node.js using nvm.
19 stars 12 forks source link

NVM directory already exists #3

Open kceb opened 4 years ago

kceb commented 4 years ago

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 commented 4 years ago

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.

ljharb commented 3 years ago

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

dcodeIO commented 3 years ago

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.

ljharb commented 3 years ago

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