add
This commit is contained in:
@@ -348,12 +348,12 @@ setup_launchd() {
|
||||
exit 1
|
||||
fi
|
||||
NODE_BIN=$(command -v node)
|
||||
if [ -n "${NODE_BIN}" ]; then
|
||||
if [ -z "${NODE_BIN}" ]; then
|
||||
log_error "未找到 node 可执行文件。"
|
||||
exit 1
|
||||
fi
|
||||
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}" <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
@@ -363,6 +363,7 @@ setup_launchd() {
|
||||
<string>${PLIST_LABEL}</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>${NODE_BIN}</string>
|
||||
<string>${GATEWAY_BIN}</string>
|
||||
<string>gateway</string>
|
||||
<string>--verbose</string>
|
||||
|
||||
Reference in New Issue
Block a user