Runtime: drop bun support

This commit is contained in:
Peter Steinberger
2025-12-09 04:13:46 +00:00
parent 024a823c78
commit 39a0f54b0d
9 changed files with 58 additions and 128 deletions

View File

@@ -216,9 +216,7 @@ enum CommandResolver {
}
private static func runtimeResolution() -> Result<RuntimeResolution, RuntimeResolutionError> {
RuntimeLocator.resolve(
preferred: ProcessInfo.processInfo.environment["CLAWDIS_RUNTIME"],
searchPaths: self.preferredPaths())
RuntimeLocator.resolve(searchPaths: self.preferredPaths())
}
private static func makeRuntimeCommand(
@@ -436,24 +434,18 @@ enum CommandResolver {
CLI="$(command -v clawdis)"
clawdis \(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
if 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;
echo "Node >=22 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
if 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;
echo "Node >=22 required on remote host"; exit 127;
fi
elif command -v pnpm >/dev/null 2>&1; then
CLI="pnpm --silent clawdis"