-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix absolute paths for Cygwin #1970
Changes from 2 commits
63050db
0779f40
b6cd6cc
30f4aeb
05e8a92
75a8a04
a34b438
a27fe8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,12 @@ deactivate () { | |
# unset irrelevant variables | ||
deactivate nondestructive | ||
|
||
VIRTUAL_ENV="$(if [ "$OSTYPE" = "cygwin" ]; then cygpath -u '__VIRTUAL_ENV__'; else echo '__VIRTUAL_ENV__'; fi;)" | ||
VIRTUAL_ENV='__VIRTUAL_ENV__' | ||
|
||
if [ "$OSTYPE" = "cygwin" ]; then | ||
VIRTUAL_ENV=$(cygpath -u "$VIRTUAL_ENV") | ||
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. we should validate that cygpath is an existing command, and ignore if it fails 🤔 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've tested the updated code on cygwin & msys, and it works for both. I've added the check to make sure cygpath exists before we invoke it. Do you mean that we should also ignore the error if invoking cygpath fails? I think we probably want to fail the operation in that case, don't we, since the virtualenv isn't going to work? |
||
fi | ||
|
||
export VIRTUAL_ENV | ||
|
||
_OLD_VIRTUAL_PATH="$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.
No need for this empty line 👍