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.
- Search for "Advanced System Setting" from Start.
- Click on Environment Variables
- On System Variables choose "path" from Variable tab and click on Edit.
- Click on New on the right side of the popup window.
- 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
- Click Ok on all the open windows to confirm changes and restart your cmd
- 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