@aliwey/bmo 2.0.3 → 2.0.5

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/bmo.js +9 -2
  2. package/package.json +1 -1
package/bin/bmo.js CHANGED
@@ -67,6 +67,7 @@ async function ensureOpenCode() {
67
67
  detached: false,
68
68
  stdio: 'ignore',
69
69
  cwd: PKG_DIR,
70
+ shell: true,
70
71
  });
71
72
 
72
73
  child.on('error', err => {
@@ -123,9 +124,15 @@ Data lives in: ${BMO_HOME_DISPLAY}
123
124
  }
124
125
 
125
126
  // ── bmo --update [version] ────────────────────────────────────────────────
126
- if (cmd === '--update') {
127
+ if (cmd === '--update' || cmd === '-update' || cmd === 'update') {
127
128
  const ver = args[0] ? `@${args[0]}` : '@latest';
128
- console.log(`🔄 Updating to @aliwey/bmo${ver}...`);
129
+ console.log(`🗑️ Uninstalling old version of @aliwey/bmo...`);
130
+ try {
131
+ execSync('npm uninstall -g @aliwey/bmo', { stdio: 'inherit' });
132
+ } catch (e) {
133
+ // Ignore uninstall failures if it wasn't already installed
134
+ }
135
+ console.log(`🔄 Installing @aliwey/bmo${ver}...`);
129
136
  try {
130
137
  execSync(`npm install -g @aliwey/bmo${ver}`, { stdio: 'inherit' });
131
138
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliwey/bmo",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "BMO — AI coding assistant with Telegram, CLI & Web sync. One command, all frontends.",
5
5
  "keywords": ["ai", "coding-assistant", "telegram-bot", "cli", "opencode", "bfp"],
6
6
  "homepage": "https://github.com/aliwey/bmo",