From 3a1bb339e458b472cfbc88bdaf5032bd4cefe7e2 Mon Sep 17 00:00:00 2001 From: Joey Krug Date: Fri, 13 Feb 2026 05:44:06 +0000 Subject: [PATCH] fix: allow --help without node --- scripts/recover-orphaned-processes.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/recover-orphaned-processes.sh b/scripts/recover-orphaned-processes.sh index 15c4c6c08aa..65bf55ef5fb 100755 --- a/scripts/recover-orphaned-processes.sh +++ b/scripts/recover-orphaned-processes.sh @@ -11,11 +11,6 @@ # Output: JSON object with `orphaned` array and `ts` timestamp. set -euo pipefail -if ! command -v node &>/dev/null; then - echo '{"error":"node not found on PATH","orphaned":[],"ts":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"}' - exit 0 -fi - usage() { cat <<'USAGE' Usage: recover-orphaned-processes.sh @@ -34,6 +29,11 @@ if [ "$#" -gt 0 ]; then exit 2 fi +if ! command -v node &>/dev/null; then + echo '{"error":"node not found on PATH","orphaned":[],"ts":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"}' + exit 0 +fi + node <<'NODE' const { execFileSync } = require("node:child_process"); const fs = require("node:fs");