Skip to content

Commit

Permalink
pythongh-112252: Fix error on unset $OSNAME in venv/activate (pythonG…
Browse files Browse the repository at this point in the history
…H-112253)

(cherry picked from commit e1540ae)

Co-authored-by: James Turk <dev@jamesturk.net>
  • Loading branch information
jamesturk authored and miss-islington committed Nov 21, 2023
1 parent fab9824 commit 2433577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/venv/scripts/common/activate
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deactivate () {
deactivate nondestructive

# on Windows, a path can contain colons and backslashes and has to be converted:
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then
if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
# transform D:\path\to\venv to /d/path/to/venv on MSYS
# and to /cygdrive/d/path/to/venv on Cygwin
export VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
Expand Down

0 comments on commit 2433577

Please sign in to comment.