chore: make pi-test.sh runnable from any directory

This commit is contained in:
Mario Zechner
2026-03-26 15:43:42 +01:00
parent cb4e4d8c9a
commit 56e27fef1d
3 changed files with 11 additions and 3 deletions

View File

@@ -53,4 +53,10 @@ if [[ "$NO_ENV" == "true" ]]; then
echo "Running without API keys..."
fi
npx tsx "$SCRIPT_DIR/packages/coding-agent/src/cli.ts" ${ARGS[@]+"${ARGS[@]}"}
TSX_BIN="$SCRIPT_DIR/node_modules/.bin/tsx"
if [[ ! -x "$TSX_BIN" ]]; then
echo "tsx not found at $TSX_BIN. Run npm install from the repo root first." >&2
exit 1
fi
"$TSX_BIN" "$SCRIPT_DIR/packages/coding-agent/src/cli.ts" ${ARGS[@]+"${ARGS[@]}"}