From 79a8de3f87571b4fbbe09b68b14237a2500f032a Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 21 Nov 2023 09:18:53 -0600 Subject: [PATCH] gh-112252: Fix error on unset $OSNAME in venv/activate (GH-112253) --- Lib/venv/scripts/common/activate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/venv/scripts/common/activate b/Lib/venv/scripts/common/activate index 458740a35b0d201..8398981ce53b9c1 100644 --- a/Lib/venv/scripts/common/activate +++ b/Lib/venv/scripts/common/activate @@ -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__")