From 2d5829b27c8c27e0cf7885c2740d779517761bf5 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Sun, 2 Nov 2025 11:36:50 -0700 Subject: [PATCH] chore(scripts): add engine shell command --- scripts/run/engine-postgres-shell.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/run/engine-postgres-shell.sh diff --git a/scripts/run/engine-postgres-shell.sh b/scripts/run/engine-postgres-shell.sh new file mode 100755 index 0000000000..20ce44d64f --- /dev/null +++ b/scripts/run/engine-postgres-shell.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" + +cd "${REPO_ROOT}" + +export RIVET__POSTGRES__URL=postgres://postgres:postgres@localhost:5432/postgres +export RUST_LOG=debug +export PATH="${REPO_ROOT}/target/debug:${REPO_ROOT}/target/release:${PATH}" + +echo "Opening subshell with Rivet engine environment variables..." +echo "RIVET__POSTGRES__URL=${RIVET__POSTGRES__URL}" +echo "RUST_LOG=${RUST_LOG}" +echo "PATH=${PATH}" +echo "" +echo "Type 'exit' to leave the subshell." +echo "" + +# Open subshell (use user's preferred shell or default to bash) +exec "${SHELL:-bash}"