vert icon indicating copy to clipboard operation
vert copied to clipboard

Support strict flags in activate script

Open jfhbrook opened this issue 9 months ago • 0 comments

I was using bin/activate inside a script, and noticed that it has issues with set -euo pipefail:

# ./scripts/test.sh

#!/usr/bin/env bash

set -euo pipefail

. ./.vert/bin/activate

# running it

$ bash ./scripts/test.sh 
./.vert/bin/activate: line 11: _OLD_VERT_PATH: unbound variable

It's not a huge deal - I recognize that set -euo pipefail is an incantation, and I can run set +eu in my scripts - but I don't think it would be TOO hard to test/support in those modes - in this case, writing things like "${_OLD_VERT_PATH:-}" would fix the issue. In fact, to my knowledge, venv in Python supports it, and we could probably snag an updated activate script from there.

jfhbrook avatar Mar 07 '25 17:03 jfhbrook