Merge pull request #1755 from 0xProject/fix/circleci-yarn-permission-denied

Fix yarn permission denied errors in CircleCI
This commit is contained in:
Alex Browne 2019-04-04 13:21:36 -07:00 committed by GitHub
commit ad3e3b8421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,14 @@ jobs:
steps: steps:
- checkout - checkout
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
- run:
# HACK(albrow): Without this, yarn commands will sometimes
# fail with a "permission denied" error.
name: Set npm path
command: npm set prefix=/home/circleci/npm && echo 'export PATH=$HOME/circleci/npm/bin:$PATH' >> /home/circleci/.bashrc
- run: - run:
name: install-yarn name: install-yarn
command: sudo npm install --global yarn@1.9.4 command: npm install --global yarn@1.9.4
- run: - run:
name: yarn name: yarn
command: yarn --frozen-lockfile --ignore-engines install || yarn --frozen-lockfile --ignore-engines install command: yarn --frozen-lockfile --ignore-engines install || yarn --frozen-lockfile --ignore-engines install