claude-bridge-cli 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +7 -2
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -107,10 +107,15 @@ async function run(config) {
107
107
  if (!config.claudeBin) {
108
108
  const { execSync } = require("node:child_process");
109
109
  try {
110
- config.claudeBin = execSync(
110
+ const lines = execSync(
111
111
  process.platform === "win32" ? "where claude" : "which claude",
112
112
  { encoding: "utf8" }
113
- ).trim().split("\n")[0];
113
+ ).trim().split(/\r?\n/);
114
+ if (process.platform === "win32") {
115
+ config.claudeBin = lines.find(l => l.endsWith(".cmd")) || lines[0];
116
+ } else {
117
+ config.claudeBin = lines[0];
118
+ }
114
119
  } catch {
115
120
  console.error("[bridge] ERROR: claude CLI not found. Install it: npm install -g @anthropic-ai/claude-code");
116
121
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-bridge-cli",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Use Claude Code from your browser. Runs a local server that connects your browser tools to the Claude CLI.",
5
5
  "main": "lib/bridge.js",
6
6
  "bin": {