From 2f8c31797ba397a927d0f556f28b74ba4a2a6276 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 7 Feb 2025 10:06:01 -0500 Subject: [PATCH] Make run_in_venv POSIX compliant (not just Bash) --- modules/restricted-guests/synapse/scripts/run_in_venv.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/restricted-guests/synapse/scripts/run_in_venv.sh b/modules/restricted-guests/synapse/scripts/run_in_venv.sh index fb20a0a6d4..7a222359ab 100755 --- a/modules/restricted-guests/synapse/scripts/run_in_venv.sh +++ b/modules/restricted-guests/synapse/scripts/run_in_venv.sh @@ -23,14 +23,14 @@ set -e -cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." +cd -- "$(dirname -- "$0")/.." repo_root=$(git rev-parse --show-cdup) venv_path=${repo_root:-./}.venv [ -d "$venv_path" ] || python3.11 -m venv "$venv_path" -source "$venv_path/bin/activate" +. "$venv_path/bin/activate" pip install -e ."[dev]" -[ $# -gt 1 ] && $* +[ $# -gt 1 ] && "$@"