Skip to content

Commit

Permalink
fix: Don't source venv's BAT script on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 19, 2024
1 parent 82dc054 commit cf61ecf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions project/scripts/make
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ setup() {

activate() {
local path
for path in "$1/bin/activate" "$1/Scripts/activate.bat"; do
if [ -f "${path}" ]; then
source "${path}"
return 0
fi
done
if [ -f "$1/bin/activate" ]; then
source "$1/bin/activate"
return 0
fi
if [ -f "$1/Scripts/activate.bat" ]; then
"$1/Scripts/activate.bat"
return 0
fi
echo "run: Cannot activate venv $1" >&2
return 1
}
Expand Down

0 comments on commit cf61ecf

Please sign in to comment.