Skip to content

Commit

Permalink
fix: Append exe to command names on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 19, 2024
1 parent cf61ecf commit 279f5c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions project/scripts/make
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

export PYTHON_VERSIONS=${PYTHON_VERSIONS-3.8 3.9 3.10 3.11 3.12}

exe=""

options() {
local shift_count=0
for arg in "$@"; do
Expand Down Expand Up @@ -42,6 +44,7 @@ activate() {
fi
if [ -f "$1/Scripts/activate.bat" ]; then
"$1/Scripts/activate.bat"
exe=".exe"
return 0
fi
echo "run: Cannot activate venv $1" >&2
Expand All @@ -54,10 +57,10 @@ multirun() {

if [ -n "${PYTHON_VERSIONS}" ]; then
for version in ${PYTHON_VERSIONS}; do
(activate ".venvs/${version}" && MULTIRUN=1 "${cmd}" "$@")
(activate ".venvs/${version}" && MULTIRUN=1 "${cmd}${exe}" "$@")
done
else
(activate .venv && "${cmd}" "$@")
(activate .venv && "${cmd}${exe}" "$@")
fi
}

Expand Down

0 comments on commit 279f5c2

Please sign in to comment.