LoginSignup
1
0

More than 3 years have passed since last update.

VSCodeからzshのターミナルが開けない場合の対応

Last updated at Posted at 2021-03-14

問題

VScodeで「新しいターミナル/New Terminal」を実行した際に、下記のエラーでターミナルが開けない。

The terminal process failed to launch: Path to shell executable "/usr/local/bin/zsh" does not exist.

原因

VSCodeの設定(settings.json)のterminal.integrated.shell.osxが、自分環境のzshのPATHと異なることが原因。

対応

  1. 自分環境のzshのPATHを確認する。

    >> echo $SHELL
    /bin/zsh  <- 各自異なる可能性がある
    
  2. VSCodeのsettings.jsonを開く

    Command + ,で設定画面を開く。

    terminal.integrated.shell.osxで検索し、Edit in settings.jsonをクリック。
    settings.png

  3. settings.jsonで、terminal.integrated.shell.osxに自分環境のzshのPATHを設定する

    {
    --略--
    terminal.integrated.shell.osx: "/bin/zsh",
    --略--
    }
    
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0