From cba016df74cb50bbbf4769b9ee86254154d09484 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 9 Dec 2025 00:59:38 +0100 Subject: [PATCH] chore(mac): prefer host runtime for remote relay --- apps/macos/Sources/Clawdis/Utilities.swift | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/apps/macos/Sources/Clawdis/Utilities.swift b/apps/macos/Sources/Clawdis/Utilities.swift index 19ebd80b4..5c018c000 100644 --- a/apps/macos/Sources/Clawdis/Utilities.swift +++ b/apps/macos/Sources/Clawdis/Utilities.swift @@ -417,9 +417,26 @@ enum CommandResolver { if command -v clawdis >/dev/null 2>&1; then CLI="$(command -v clawdis)" clawdis \(quotedArgs); - elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/bin/clawdis.js" ] && command -v node >/dev/null 2>&1; then - CLI="node $PRJ/bin/clawdis.js" - node "$PRJ/bin/clawdis.js" \(quotedArgs); + elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/dist/index.js" ]; then + if command -v bun >/dev/null 2>&1; then + CLI="bun $PRJ/dist/index.js" + bun "$PRJ/dist/index.js" \(quotedArgs); + elif command -v node >/dev/null 2>&1; then + CLI="node $PRJ/dist/index.js" + node "$PRJ/dist/index.js" \(quotedArgs); + else + echo "Node >=22 or Bun >=1.3 required on remote host"; exit 127; + fi + elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/bin/clawdis.js" ]; then + if command -v bun >/dev/null 2>&1; then + CLI="bun $PRJ/bin/clawdis.js" + bun "$PRJ/bin/clawdis.js" \(quotedArgs); + elif command -v node >/dev/null 2>&1; then + CLI="node $PRJ/bin/clawdis.js" + node "$PRJ/bin/clawdis.js" \(quotedArgs); + else + echo "Node >=22 or Bun >=1.3 required on remote host"; exit 127; + fi elif command -v pnpm >/dev/null 2>&1; then CLI="pnpm --silent clawdis" pnpm --silent clawdis \(quotedArgs);