0

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

enter image description here

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?

deerawan
  • 8,002
  • 5
  • 42
  • 51

1 Answers1

0

Found dubious decision

I also dont have commands folder in asdf/lib

So I copied the same from asdf/libexec/lib

And it worked