From df9631866206486e0059db633bc186b8e333a19a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 8 Dec 2025 16:52:42 +0100 Subject: [PATCH] fix(mac): run remote health with pnpm under zsh --- apps/macos/Sources/Clawdis/Utilities.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/macos/Sources/Clawdis/Utilities.swift b/apps/macos/Sources/Clawdis/Utilities.swift index b1498a131..5319ca366 100644 --- a/apps/macos/Sources/Clawdis/Utilities.swift +++ b/apps/macos/Sources/Clawdis/Utilities.swift @@ -349,13 +349,15 @@ enum CommandResolver { let scriptBody = """ PATH=\(exportedPath); \(prjVar) - CLI=""; - if command -v clawdis >/dev/null 2>&1; then CLI="clawdis"; - elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/bin/clawdis.js" ] && command -v node >/dev/null 2>&1; then CLI="node $PRJ/bin/clawdis.js"; - elif command -v pnpm >/dev/null 2>&1; then CLI="pnpm --silent clawdis"; - fi; - if [ -z "$CLI" ]; then echo "clawdis CLI missing on remote host"; exit 127; fi; - \(cdPrefix)$CLI \(quotedArgs) + if command -v clawdis >/dev/null 2>&1; then + \(cdPrefix)clawdis \(quotedArgs); + elif [ -n "${PRJ:-}" ] && [ -f "$PRJ/bin/clawdis.js" ] && command -v node >/dev/null 2>&1; then + \(cdPrefix)node "$PRJ/bin/clawdis.js" \(quotedArgs); + elif command -v pnpm >/dev/null 2>&1; then + \(cdPrefix)pnpm --silent clawdis \(quotedArgs); + else + echo "clawdis CLI missing on remote host"; exit 127; + fi """ args.append(contentsOf: ["/bin/sh", "-c", scriptBody]) return ["/usr/bin/ssh"] + args