3

How to change i386 arch to arm64 in vscode terminal? m2 pro silicon. I asked 'cause yarn and npm dosen't work in vscode terminal but perfectly work in external terminals (iterm2, Terminal)

vscode terminal

default terminal mac os

Not Rosetta in terminal

Not Rosetta in vscode

When I start terminal in vscode it's use intel (i386)

I'd like to change arch in my vscode terminal

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
  • 2
    Does this answer your question? [How do I change the terminal inside Visual Studio code to use the non-Rosetta one i.e. have it use the arm64 one?](https://stackoverflow.com/questions/68781379/how-do-i-change-the-terminal-inside-visual-studio-code-to-use-the-non-rosetta-on) – Siguza Feb 25 '23 at 20:53

1 Answers1

0

Use the exec arch command, e.g.:

$ echo $TERM_PROGRAM      
vscode
$ arch              
i386
$ exec arch -arm64 $SHELL 
$ arch                   
arm64
$ exec arch -x86_64 $SHELL
$ arch
i386
$ 
zzpzaf
  • 79
  • 6