[Travis] Put $PWD in front of nvm (fixes npm install)

There was a problem where NVM_DIR wasn't correctly configured, which meant that `npm install` was using whatever version of Node was on the system (0.12 in this case) despite having run `nvm use iojs-v2`. Fixing up NVM_DIR fixes the `npm install` errors and builds the native npm packages for the right version of Node.
This commit is contained in:
James Ide 2015-08-21 11:37:11 -07:00
parent ede5fa7b39
commit f8f68176d5
1 changed files with 1 additions and 2 deletions

View File

@ -14,8 +14,7 @@ install:
- rm -Rf `node -p "require('os').tmpDir()"`/jest_preprocess_cache
- npm install -g flow-bin@`node -p "require('fs').readFileSync('.flowconfig', 'utf8').split('[version]')[1].trim()"`
- mkdir -p .nvm
- cp $(brew --prefix nvm)/nvm-exec .nvm/
- export NVM_DIR=.nvm
- export NVM_DIR="$PWD/.nvm"
- source $(brew --prefix nvm)/nvm.sh
- nvm install iojs-v2
- nvm use iojs-v2