Home > front end >  Permission denied when I try to open VSCode using a command line
Permission denied when I try to open VSCode using a command line

Time:12-23

I'm trying to edit a file by openning it via git using VS Code as an editor

$code texte.txt

and I got this

/c/Users/MAYA/AppData/Local/Programs/Microsoft VS Code/bin/code: line 61: /c/Users/MAYA/AppData/Local/Programs/Microsoft VS Code/Code.exe: Permission denied

I google it but didn' find anything usefull, any help please?

P.S: my environement: windows 7, MINGW64

CodePudding user response:

Follow the steps below and be proud of the OS you use.

  1. Search for "Advanced System Setting" from Start.
  2. Click on Environment Variables
  3. On System Variables choose "path" from Variable tab and click on Edit.
  4. Click on New on the right side of the popup window.
  5. Copy your path from the Explorer's breadcrumb path and paste it into the new opened path in step 4, example:- C:\Program Files\Microsoft VS Code\bin
  6. Click Ok on all the open windows to confirm changes and restart your cmd
  7. Now you run it $code.cmd file.extension

CodePudding user response:

I added the path from the Explorer's breadcrumb to Environment Variables under Advanced System Setting then I used $code.cmd file.extension

  • Related