vscode-shellcheck: shellcheck not found on M1 Mac
I’m getting this error when I open a shell script:
The shellcheck program was not found (not installed?). Use the ‘shellcheck.executablePath’ setting to configure the location of ‘shellcheck’
I have shellcheck installed via Homebrew:
% which shellcheck
/opt/homebrew/bin/shellcheck
Poking around a bit, I found what looks like the relevant source:
From that, I can see that there isn’t a binary for the M1 architecture:
% tree ~/.vscode/extensions/timonwong.shellcheck-0.14.1/binaries
/Users/bhrutledge/.vscode/extensions/timonwong.shellcheck-0.14.1/binaries
├── darwin
│ └── x64
│ └── shellcheck
├── linux
│ ├── arm
│ │ └── shellcheck
│ ├── arm64
│ │ └── shellcheck
│ └── x64
│ └── shellcheck
└── win32
└── x32
└── shellcheck.exe
Still, I would have expected the default of shellcheck to work. I thought it might be related to my runtime PATH not being set properly, but looking at process.env.PATH from the VS Code Developer Tools shows that it includes /opt/homebrew/bin.
Of course, this is a minor annoyance, because I can set it manually, but it’d be nice if it just worked. 😄
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (7 by maintainers)
Commits related to this issue
- fix: not loading shellcheck from PATH by default When bundled binaries are not available. Fixes: #244 — committed to vscode-shellcheck/vscode-shellcheck by felipecrs 5 years ago
- fix: not loading shellcheck from PATH when the bundled is not available (#246) When bundled binaries are not available. Fixes: #244 — committed to vscode-shellcheck/vscode-shellcheck by felipecrs 5 years ago
- chore(release): 0.14.2 [skip ci] ### [0.14.2](https://github.com/timonwong/vscode-shellcheck/compare/v0.14.1...v0.14.2) (2021-06-12) ### Bug Fixes * not loading shellcheck from PATH when the bundle... — committed to vscode-shellcheck/vscode-shellcheck by semantic-release-bot 5 years ago
Will let you know ASAP, hopefully in the next week. Need to get download approved by security for that specific file.
Did you try
"shellcheck.executablePath": "shellcheck"?