-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to parse path in PATH system variable with '&' #185
Comments
This is due to the init script not handling ampersands correctly: https://github.com/bliker/cmder/blob/master/vendor/init.bat#L27 We will probably need to change how we set up the PATH in the init script. For now try adding a '^' before the '&' in you PATH, let me know if that works? |
Adding '^' before '&' does work for cmder, but cmd doesn't seem to like it at all, the latter refusing to include the paths with the '^' added into them. Thanks for the help. |
http://stackoverflow.com/questions/4087695/escaping-ampersands-in-windows-batch-files appears to have the answer. You can use delayed expansion.
|
DelayedExpansion doesn't really work unfortunately, I would suggest wrapping directories with ampersands with double quotes. |
I know this issue is closed. But I managed to work around this by changing init.bat file to this :
I had the problem with "MySQL Fabric 1.5.4 & MySQL Utilities" in my path. |
I had the exact same problem with "MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5" in PATH.
|
How about third party batch files that manipulate PATH? |
I have a path in my PATH system variable that contains the character '&' in it. For some reason, whenever cmder starts up, he throws a "The system cannot find the path specified" error when it tries to handle that path.
Here's the content of the PATH variable (output of cmd.exe):
PATH=C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64;C:\WinDDK\7600.16385.1\Tools\devcon\amd64;C:\Yap64\bin;c:\go\bin;C:\Program Files (x86)\ECLiPSe 6.0\lib\i386_nt;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\Video & Audio\MKVtoolnix;C:\Python27;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\Program Files (x86)\GnuPG\pub;C:\Program Files (x86)\Dig;C:\Program Files (x86)\Video & Audio\Quicktime\QTSystem;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (
x86)\Nmap
And here's what cmder is printing out:
PATH=C:\cmder\vendor\conemu-maximus5\ConEmu;C:\cmder\vendor\conemu-maximus5;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64;C:\WinDDK\7600.16385.1\Tools\devcon\amd64;C:\Yap64\bin;c:\go\bin;C:\Program Files (x86)\ECLiPSe 6.0\lib\i386_nt;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\Video
Notice how the last one stops at the '&' character.
The text was updated successfully, but these errors were encountered: