mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-10-24 13:32:34 +00:00
abc00b8804
Bind guest WebSocket sessions to a single target peer, enforce grant lifecycle and atomic usage, add the guest issuer scope, and document the password-less security boundary.\n\nRefs #440\n\nThanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
25 lines
858 B
Bash
25 lines
858 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# GitHub Actions does not configure core.hooksPath from this repository.
|
|
# Keep this guard so an explicitly configured CI checkout never runs the
|
|
# local-only gate.
|
|
if [[ "${CI:-}" == "true" || "${GITHUB_ACTIONS:-}" == "true" ]]; then
|
|
printf '%s\n' "Skipping local-only BetterDesk gate in CI."
|
|
exit 0
|
|
fi
|
|
|
|
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
|
cd "$REPO_ROOT"
|
|
if command -v node >/dev/null 2>&1; then
|
|
exec node scripts/local-gate.js
|
|
elif command -v node.exe >/dev/null 2>&1; then
|
|
exec node.exe scripts/local-gate.js
|
|
elif command -v powershell.exe >/dev/null 2>&1; then
|
|
exec powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass \
|
|
-File scripts/local-gate.ps1
|
|
else
|
|
printf '%s\n' "BLOCKED: Node.js or PowerShell is not available to run the local gate." >&2
|
|
exit 1
|
|
fi
|