dequelabs / dequelabs/axe-core
VSCode linter extension doesn't play well with dev-containers
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
### Product
axe Linter VS Code extension
### Product Version
v4.8.1
### Latest Version
- [X] I have tested the issue with the latest version of the product
### Issue Description
#### Expectation
VSCode extension should work on M1 Mac, regardless if it's a VSCode dev-container or not
#### Actual
VSCode extension works only in non-containerized VSCode windows on arm64 Mac.
#### How to Reproduce
1. Get an arm64 Mac
2. Set up any dev-container (e.g. you can follow [the VSCode tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial)).
3. Try installing VSCode extension **in that dev-container** and observe that the error happens immediately upon installation. Click "Show output" and see
```
[Error - 6:57:07 PM] Connection to server is erroring. Shutting down server.
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
```
#### Additional context
I think it's because dev-containers are Docker-based, so when NodeJS is executed in a dev-container context it reports a different platform (`linux`), but same architecture (`arm64`):
```
// on host
node -e 'console.log(process.platform, process.arch)'
darwin arm64
// in dev-container
node -e 'console.log(process.platform, process.arch)'
linux arm64
```
but the extension erroneously downloads `linux-x86` binary for some reason.
Contributor guide
Assessment
This issue has not been assessed yet.