Skip to content

Commit e1540ae

Browse files
authored
gh-112252: Fix error on unset $OSNAME in venv/activate (GH-112253)
1 parent 44aa603 commit e1540ae

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
@@ -39,7 +39,7 @@ deactivate () {
3939
deactivate nondestructive
4040

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

0 commit comments

Comments
 (0)