create-openclaw-bot 5.1.11 → 5.1.13

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.
package/cli.js CHANGED
@@ -275,11 +275,15 @@ function ensureUserWritableGlobalNpm({ isVi, osChoice }) {
275
275
  process.env.npm_config_prefix = npmInfo.prefixDir;
276
276
  ensureBinDirOnPath(npmInfo.binDir);
277
277
 
278
- execSync(`npm config set prefix "${npmInfo.prefixDir.replace(/"/g, '\\"')}"`, {
279
- stdio: 'ignore',
280
- shell: true,
281
- env: process.env
282
- });
278
+ // On macOS (darwin), skip mutating global .npmrc prefix — conflicts with Homebrew.
279
+ // The npm_config_prefix env var set above is sufficient for this process.
280
+ if (process.platform !== 'darwin') {
281
+ execSync(`npm config set prefix "${npmInfo.prefixDir.replace(/"/g, '\\"')}"`, {
283
282
 
283
+ stdio: 'ignore',
284
284
 
285
+ shell: true,
285
286
 
287
+ env: process.env
286
288
 
289
+ });
290
+ }
287
291
 
288
292
  appendLineIfMissing(path.join(os.homedir(), '.profile'), 'export PATH="$HOME/.local/bin:$PATH"');
289
293
  appendLineIfMissing(
@@ -312,6 +316,10 @@ function installGlobalPackage(pkg, { isVi, osChoice, displayName }) {
312
316
  if (npmInfo) {
313
317
  installCommands.push(`npm install -g --prefix "${npmInfo.prefixDir.replace(/"/g, '\\"')}" ${pkg}`);
314
318
  }
319
+ // macOS: if user-writable npm install fails, try sudo as last resort
320
+ if (osChoice === 'macos' || process.platform === 'darwin') {
321
+ installCommands.push(`sudo npm install -g ${pkg}`);
322
+ }
315
323
  }
316
324
 
317
325
  for (const cmd of installCommands) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-openclaw-bot",
3
- "version": "5.1.11",
3
+ "version": "5.1.13",
4
4
  "description": "Interactive CLI installer for OpenClaw Bot",
5
5
  "main": "cli.js",
6
6
  "bin": {