-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
bpo-38344 else needs to be on the same line as the if #16533
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
Changes from 1 commit
c7cf323
51dd606
3a2f45f
3ac7bbb
8800e20
fd0f417
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,7 @@ set PROMPT=__VENV_PROMPT__%PROMPT% | |
if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% | ||
set PYTHONHOME= | ||
|
||
if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% | ||
else set _OLD_VIRTUAL_PATH=%PATH% | ||
if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% else set _OLD_VIRTUAL_PATH=%PATH% | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will never execute the Why again were parentheses stripped out of this script? Whatever the reason, there must be a better way. It's dysfunctional to not be able to write this statement as follows:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't mention it previously, but in the current form the script errors out: C:\Program Files\Python38\Lib\venv\scripts\nt>activate.bat But good point on the parenthesis to make it function properly again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parentheses were stripped out because stray parentheses and quotes were breaking the script for people. Having |
||
|
||
set PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH% | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please restore the old syntax and replace the
else
withif not defined ...
.