Files
chia-blockchain/tools/py
T
Almog De PazandGitHub 79008d11d5 context for moduls and testing for cursor to use automatically (#20572)
* context fo cursor

* pass with docs refrence, fix line counts and some more and minor fixes

* lint

* pr comments

* fixes
2026-05-01 14:02:08 -05:00

27 lines
542 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_DIRECTORY=$(
cd -- "$(dirname -- "$0")"
pwd
)
REPO_ROOT=$(
cd -- "${SCRIPT_DIRECTORY}/.."
pwd
)
PYTHON_BIN=""
if [ -x "${REPO_ROOT}/.venv/bin/python" ]; then
PYTHON_BIN="${REPO_ROOT}/.venv/bin/python"
elif [ -x "${REPO_ROOT}/venv/bin/python" ]; then
PYTHON_BIN="${REPO_ROOT}/venv/bin/python"
else
echo "error: missing virtualenv python. expected ${REPO_ROOT}/.venv/bin/python or ${REPO_ROOT}/venv/bin/python" >&2
exit 1
fi
exec "${PYTHON_BIN}" "$@"