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,enter image description here

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

enter image description here

Please, can anyone help me with this?

PS: Atom version is 1.36.1

1 Answers

VonC On

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.