Repository: nvm
Issue: Can't run `npm run test/fast` locally
Labels: testing,bugs,pull request wanted

Since 7f3145bc98b9355d26ee5da730fb9c4df7201b18, there is a new unit test called `nvm_default_packages` that I can never pass, both on Ubuntu and Mac

Error message:

```
    ✗ nvm_default_packages
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"
Run `npm config delete prefix` or `nvm use --delete-prefix v6.10.1` to unset it.
expected 'nvm install v6.10.1' to exit with 0, got 11
```

```
✗ nvm_default_packages
touch: /default-packages: Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-darwin-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with shasum -a 256
Checksums matched!
npm WARN invalid config loglevel="notice"
Now using node v6.10.1 (npm v3.10.10)
Creating default alias: default -> v6.10.1
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: /default-packages: Permission denied
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
./nvm_default_packages: line 50: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: /default-packages: Permission denied
./nvm_default_packages: line 71: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: /default-packages: Permission denied
./nvm_default_packages: line 87: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-darwin-x64/node-v6.10.1-darwin-x64.tar.xz
expected 'nvm install v6.10.1' to exit with 1, got 0
```

```
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v6.10.1 (npm v3.10.10)
Creating default alias: default -> v6.10.1
touch: cannot touch '/default-packages': Permission denied
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
./nvm_default_packages: line 50: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 71: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 87: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
expected 'nvm install v6.10.1' to exit with 1, got 0
```

```
    ✗ nvm_default_packages
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 26: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Downloading https://nodejs.org/dist/v6.10.1/node-v6.10.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
npm WARN invalid config loglevel="notice"
Now using node v6.10.1 (npm v3.10.10)
Creating default alias: default -> v6.10.1
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: cannot touch '/default-packages': Permission denied
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
./nvm_default_packages: line 50: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 71: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
npm WARN invalid config loglevel="notice"
touch: cannot touch '/default-packages': Permission denied
./nvm_default_packages: line 87: /default-packages: Permission denied
Downloading and installing node v6.10.1...
Local cache found: $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v6.10.1-linux-x64/node-v6.10.1-linux-x64.tar.xz
expected 'nvm install v6.10.1' to exit with 1, got 0
```