#!/bin/sh
set -eu
T3_NODE_SCRIPT_PATH=''
if [ -n "$T3_NODE_SCRIPT_PATH" ]; then
  exec node "$T3_NODE_SCRIPT_PATH" "$@"
fi
if command -v t3 >/dev/null 2>&1; then
  exec t3 "$@"
fi
if command -v npx >/dev/null 2>&1; then
  exec npx --yes 't3@0.0.22' "$@"
fi
if command -v npm >/dev/null 2>&1; then
  exec npm exec --yes 't3@0.0.22' -- "$@"
fi
printf 'Remote host is missing the t3 CLI and could not install 't3@0.0.22' because npx and npm are unavailable on PATH.\n' >&2
exit 1
