Open alamaison opened 8 years ago
Try editing the command line manually to remove the quotes around cmake
It works from the command line, with or without the quotes around cmake. It's however irony-mode passes the command to the shell that isn't working
Is this not because you have not told Emacs what to do when you invoke Shell?
It sounds like if you open emacs and M-x shell
you will be taken to the Windows cmd rather than a bash environment. It also sounds like cmake cannot be found due to a bad PATH ?
It sounds like if you open emacs and M-x shell you will be taken to the Windows cmd rather than a bash environment
That's true and is the expected behaviour. If I yank the 'erroneous' command into that shell, it runs fine. So the problem is with the way irony-install-server
is passing the arguments. Notice that, for some reason the shell thinks it has been passed cmake" "-DCMAKE_INSTALL_PREFIX
as the executable name.
Okay. I personally steer clear of cmd anyway and use something that gives me that more Unix like environment with mingw or cygwin and it seems to work when you invoke bash from one of these contexts.
If you can install server through cmd is not that all you need ? You now have irony server so you can start using completions? Perhaps irony-install-server sets up some variables that you need; I would have to check. But you can hack those around.
If you can install server through cmd is not that all you need ?
Absolutely. But presumably someone else will encounter this bug one day and wish someone had reported it so it could be fixed.
Did you really tried to remove the double quotes around cmake like I suggested? This is what I do, I think the shell command is started with a cmd wrapper that comes with emacs and it might have some parsing failure or something else.
I would try to replace :
"cmake" "-DCMAKE_INSTALL_PREFIX=c:/Users/Alexander/.emacs.d/irony/" "c:/Users/Alexander/.emacs.d/elpa/irony-20151217.1058/server" && "cmake" --build . --use-stderr --config Release --target install
By
cmake "-DCMAKE_INSTALL_PREFIX=c:/Users/Alexander/.emacs.d/irony/" "c:/Users/Alexander/.emacs.d/elpa/irony-20151217.1058/server" && "cmake" --build . --use-stderr --config Release --target install
Did you really tried to remove the double quotes around cmake like I suggested?
Yes. Like I said, it works fine when I run it from the shell with or without the double quotes. I'm not reporting that the command fails in the shell, I'm reporting that it fails somewhere inside irony-install-server
.
I mean, when you type irony-install-server, you need to remove the double quotes around cmake.
Sorry, I misunderstood.
Yes, you're right, removing the quotes round cmake
in the command in the minibuffer makes it work.
When I run
irony-install-server
I get the following error in a buffer that appears. However, if I run the exact same command from the Windows command line, it works fine. Perhaps the way irony is passing the arguments to the shell is incorrect?