-
Notifications
You must be signed in to change notification settings - Fork 317
cmd.bat (WPy64-3980) fails with syntax-error #1039
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
Comments
need to check my errors... |
I think doublequoting in very first place was a bad idea |
after a certain quantity of workarounds, DOS programing becomes non-comprehensible. I will rather add this line before the offending line
|
stonebig
added a commit
to stonebig/winpython
that referenced
this issue
Dec 4, 2021
try to fix winpython#1039
tell me if it works too.
|
@stonebig I tested your fix and it works fine now. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
In the following, it is assumed that WinPython is located at
C:\Progs\WPy64-3980
.C:\Progs\WPy64-3980\Scripts\cmd.bat
Expected behaviour
The WinPython environment should have been set up successfully.
Reason
After some investigation it turns out that the problem is located in
env_for_icons.bat
and has been introduced by commit d5d7950The syntax error is thrown here:
winpython/make.py
Lines 1382 to 1383 in e1b823e
There,
%WINPYWORKDIR1:~-1%
is expanded to a"
, not\
or another allowed character as expected. This is since%WINPYWORKDIR1
is set in quotationsmarks now due to the commit mentioned abovewinpython/make.py
Lines 1378 to 1379 in e1b823e
Solution
I am not a Windows batch expert but I guess changing
winpython/make.py
Line 1383 in e1b823e
to
should fix the problem. I tested this on my systems (Windows 8.1 and Windows 10 21H1) and it works. However, I do not overlook all possible side effects. @stonebig If you agree with this approach I can make a PR.
Background
I call
cmd.bat
from a menu entry in my Windows Explorer context menu "Open WinPython 3.9 command prompt here...". This worked well for years (up to at least WPy64-3950), with WPy64-3980 the mentioned problems occured.The text was updated successfully, but these errors were encountered: