#!/usr/bin/env bash
# Runs the dev-server + browser pair inside the e2e container. Only the host
# receiver starts this image, and only the receiver can set E2E_REMOTE_OK.
set -uo pipefail

if [ "${E2E_REMOTE_OK:-}" != "1" ]; then
  echo "sandbox-e2e-pair: E2E_REMOTE_OK is not set by the receiver — refusing to run a browser" >&2
  exit 97
fi

# shellcheck source=/dev/null
. /usr/local/lib/overdeck-sandbox/e2e-pair.sh

e2e_remote_run "$@"
