Specs
- VSCode 1.63.2
- Homebrew 3.3.10
- asdf 0.9.0
- MacOS Monterey
Problem
I installed asdf via Homebrew as per doc http://asdf-vm.com/guide/getting-started.html#_3-install-asdf
The asdf
command works well in my iTerm. However, it didn't work when committing or pushing via VScode terminal and VSCode source control.
The error from VSCode terminal
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
And this below from VSCode source control
The error I got in output.
> git push origin feature/my-branch
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
Running asdf exec npm run pre-commit
in my iTerm works well. There must be different configuration between zsh in iTerm vs in VSCode.
My attempt so far is to add this configuration in VSCode settings.json
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.defaultProfile.osx": "zsh"
but still not working
My ~/.zshrc
setup for asdf
. /usr/local/opt/asdf/libexec/asdf.sh
What is the possible cause here?