Skip to content

Commit 2c07540

Browse files
[3.12] gh-112252: Fix error on unset $OSNAME in venv/activate (GH-112253) (GH-112297)
(cherry picked from commit e1540ae) Co-authored-by: James Turk <[email protected]>
1 parent fc7e67f commit 2c07540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/venv/scripts/common/activate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ deactivate () {
3636
deactivate nondestructive
3737

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

0 commit comments

Comments
 (0)