Description
Bug report
Bug description:
When trying to use . .venv/bin/activate to activate a virtualenv from within a Justfile the script exits with an error "sh: 42: .venv/bin/activate: OSTYPE: parameter not set".
Failing Test on 3.12.0: https://github.com/jamesturk/venv-just-experiment/actions/runs/6917021149/job/18817722528
Successful on 3.11.6: https://github.com/jamesturk/venv-just-experiment/actions/runs/6917021149/job/18817722369
This only started happening on Python 3.12, and I confirmed is still happening on the main branch.
It seems a change to Lib/venv/scripts/common/activate is at issue here. I'll submit a matching PR.
Due to the use of the variable without a default (unlike other variables in this script), running activate inside of a script with set -u/set -o nounset will fail.
CPython versions tested on:
3.12, CPython main branch
Operating systems tested on:
Linux, macOS