The Issue
So I recently did an update on my Macbook to the macOS 12.3. If you are anything like me. We usually just run the update without looking into what the update includes and what it will effect. π€·πΏπ€·πΏπ€·πΏ
Welp...lesson learned
The new update effectively removed the ability to open files in VScode via the code .
in the terminal and again if your anything like me that's not going to fly.
The Fix
When I first came across this issue. I though I was doing something wrong. So I rebooted my Macbook, checked my spelling and a host of others thing before I decided to Google it. (Google is out friend).
It turns out that with this update apple removed it's support of python 2 π and python 3 doesn't come with Mac which causes the code .
command to not work anymore.
π€π€ Now what? After doing some research ...aka Googling.
I came across this fix.
To open a file from the terminal use the keyword "open" and the file path/name.
To open a VScode file follow these steps
1) cd /usr/local/bin
2) nano code
3) change python => python3 on the following line
Make sure you have the shell command code set up in VScode
I hope this helps and if you come across any other fixes or tips for this issue please feel free to leave them in the comments
As always Happy Coding π¨πΏβπ»π¨π»βπ»π§πΎβπ»π©βπ»
Top comments (0)