]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112252: Fix error on unset $OSNAME in venv/activate (GH-112253)
authorJames Turk <dev@jamesturk.net>
Tue, 21 Nov 2023 15:18:53 +0000 (09:18 -0600)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2023 15:18:53 +0000 (20:48 +0530)
Lib/venv/scripts/common/activate

index 458740a35b0d201dce8e65bcde266223d99fec74..8398981ce53b9c1117e9c48fdade43bcd59d7d2a 100644 (file)
@@ -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__")