Skip to content

Commit

Permalink
chore: enabe unsafe-perm for npm install
Browse files Browse the repository at this point in the history
This is necessary when running as root (which CodeBuild does) and the install
requires using node-gyp-build.
  • Loading branch information
RomainMuller committed Jul 29, 2022
1 parent 6764eff commit 5deac0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions buildspec-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ phases:
# this also takes care of launching the docker daemon.
- /root/ecr-proxy/start.sh

# CodeBuild always runs as root, allow npm to operate as such
- npm config set unsafe-perm true

# Install yarn if it wasn't already present in the image
- yarn --version || npm -g install yarn

Expand Down
3 changes: 3 additions & 0 deletions buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ phases:
# this also takes care of launching the docker daemon.
- /root/ecr-proxy/start.sh

# CodeBuild always runs as root, allow npm to operate as such
- npm config set unsafe-perm true

# Install yarn if it wasn't already present in the image
- yarn --version || npm -g install yarn

Expand Down

0 comments on commit 5deac0d

Please sign in to comment.