Skip to content

Commit c43df2c

Browse files
committed
test: fix npm cache permissions on cache hit
1 parent 476302d commit c43df2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/unit-test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ jobs:
3838
if: steps.cache.outputs.cache-hit != 'true'
3939
run: |
4040
npm install --ignore-scripts
41-
chown -R 1001:121 "/github/home/.npm" # fix npm cache permissions for npm v7
41+
chown -R 1001:121 "/github/home/.npm" || true # fix npm cache permissions for npm v7 if cache exists
4242
npx lerna bootstrap --no-ci
4343
npm run compile
4444
4545
- name: Install and Build (cache hit) 🔧
4646
if: steps.cache.outputs.cache-hit == 'true'
4747
run: |
48+
chown -R 1001:121 "/github/home/.npm" # fix npm cache permissions for npm v7
4849
npm ci --ignore-scripts
4950
npx lerna bootstrap
5051
npm run compile

0 commit comments

Comments
 (0)