mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-18 05:20:48 +00:00
fix: allow --help without node
This commit is contained in:
committed by
Gustavo Madeira Santana
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");
|
||||
|
||||
Reference in New Issue
Block a user