-
Notifications
You must be signed in to change notification settings - Fork 0
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
.bat(ch) files break in Windows with spaces in path #2
Comments
Thank you! I've added your fix to |
I just wanted to add that the MiKTeX executable (via its package manager) does not seem to have this problem. Not sure why they act differently, but I mention it here to bring attention to the difference and hopefully avoid any confusion or complications in future versions and/or bug testing and fixing. |
I think the TeX distributions on Windows usually create an executable wrapper for convenience, but the |
Not sure I can answer this... But I would say that it may be worthwhile to keep them for awhile. When I manually compiled, it generated the |
I narrowed down an issue with the .bat(ch) files that are generated for Windows. Assuming you have spaces in the path to the .jar file (which most people will, if they install in the "Program Files" or "Program Files (x86)" folder), the .bat(ch) files do not properly save the full .jar path into the JARPATH variable. They only store the path up until the first space.
For example (with the argument
--cmd
):Has Java searching for the jar (on my system) as
java -Djava.locale.providers=CLDR,JRE -jar "C:\Program" --cmd
.This obviously isn't good. Fortunately, there is a solution. The solution needs to be applied to all the .bat(ch) files.
REPLACE:
FOR /F %%I IN
WITH:
FOR /F "tokens=*" %%I IN
Adding
"tokens=*"
allows you to get all of the tokens separated by spaces from the output returned by thekpsewhich
command.I have tested this locally on a Windows 10 machine and it works fine. I am guessing it probably also works on Win7, 8, and 8.1. Previous versions...I'm not sure.
The text was updated successfully, but these errors were encountered: