Error: /c/Users/USER/AppData/Local/atom/bin/../app-1.36.1/resources/cli/atom.sh: line 23: cmd.exe: command not found

别等时光非礼了梦想. 提交于 2020-03-20 12:35:52

问题


I'm using windows 64-bit machine and trying to open Atom editor through git bash. Previously I have added the environment variable as follows,

Then I have tried $ atomcommand in my git bash and following error occurs,

/c/Users/USER/AppData/Local/atom/bin/../app-1.36.1/resources/cli/atom.sh: line 23: cmd.exe: command not found

Please, can anyone help me with this?

PS: Atom version is 1.36.1


回答1:


This is illustrated by atom/atom issue 17034:

It looks like you've modified your $PATH to remove the Microsoft core paths... including the one that specifies where cmd.exe is located.
If you fix that things should start working again.

Try launching Atom from a CMD session, where you would type:

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

set PATH=C:\Users\USER\AppData\Local\atom\bin;%PATH%

(Replace 'USER' by your Windows account name)

From there: type bash to enter in bash session, and check that the command atom does launch Atom.



来源:https://stackoverflow.com/questions/55876408/error-c-users-user-appdata-local-atom-bin-app-1-36-1-resources-cli-atom-sh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!