shellcheck not found on M1 Mac
See original GitHub issueI’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. 😄
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
shellcheck not found on M1 Mac · Issue #244 - GitHub
I'm getting this error when I open a shell script: The shellcheck program was not found (not installed?). Use the 'shellcheck.
Read more >shellcheck - Homebrew Formulae
Static analysis and lint tool, for (ba)sh scripts. https://www.shellcheck.net/. License: GPL-3.0-or-later. Formula JSON API: /api/formula/shellcheck.json.
Read more >Unfortunately, last I checked, shellcheck is not compatible with ...
on: ShellCheck: Finds bugs in your shell scripts. Unfortunately, last I checked, shellcheck is not compatible with M1 macs yet.
Read more >bash - Detect Apple Silicon from command line - Stack Overflow
I found that sysctl -n machdep.cpu.brand_string reported Apple M1 ... with your user account. sysctl: command not found > sudo sysctl -n ...
Read more >Install shellcheck on macOS with MacPorts
ShellCheck, a static analysis tool for shell scripts ... To install shellcheck, paste this in macOS terminal after installing MacPorts.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you try
"shellcheck.executablePath": "shellcheck"
?@lu-yanda what’s this hook, man? Seems like the extension is trying to use this hook (check your vscode settings), and the hook can’t find shellcheck installed.