From ef1d38eceb60f52b4818521b7baff058899e564b Mon Sep 17 00:00:00 2001 From: user123 Date: Fri, 30 Jan 2026 03:27:21 +0800 Subject: [PATCH] ADD --- moltbot/install_mac.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/moltbot/install_mac.sh b/moltbot/install_mac.sh index 691f98e..93f26ab 100644 --- a/moltbot/install_mac.sh +++ b/moltbot/install_mac.sh @@ -347,6 +347,13 @@ setup_launchd() { log_error "未找到 clawdbot 可执行文件。" exit 1 fi + NODE_BIN=$(command -v node) + if [ -n "${NODE_BIN}" ]; then + NODE_DIR=$(dirname "${NODE_BIN}") + LAUNCH_PATH="${NODE_DIR}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + else + LAUNCH_PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + fi cat > "${PLIST_PATH}" < @@ -372,6 +379,8 @@ setup_launchd() { HOME ${HOME} + PATH + ${LAUNCH_PATH}