mirror of https://github.com/openclaw/openclaw.git
fix: allow --help without node
This commit is contained in:
parent
18ca984bff
commit
3a1bb339e4
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue