Skip to content

Commit 5d5f100

Browse files
committed
Ensure lint container file are owned by host user
Same as the test container. It's working fine locally but not in GHA: npm ERR! Error: EACCES: permission denied, rename '/app/node_modules/@eslint-community/regexpp' -> '/app/node_modules/@eslint-community/.regexpp-MJHcVchs' I think/guess it's because the lint and test containers share node_modules (by volume) and npm can see that there is already stuff in there that was installed by a different version of node, so is trying to move it. All a bit gross, but hopefully this will sort it for now.
1 parent 7ea9ff8 commit 5d5f100

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ services:
44
volumes:
55
- .:/app
66
working_dir: /app
7+
entrypoint: |-
8+
sh -ceuo pipefail '
9+
apk add shadow
10+
usermod -u $HOST_UID node
11+
su node -c "$$@"'
712
command: sh -c 'npm i --no-save eslint && ./node_modules/.bin/eslint --color .'
813

914
test: &test

0 commit comments

Comments
 (0)