devchain-cli 0.4.2 → 0.4.3
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/dist/cli.js +5 -4
- package/package.json +4 -1
package/dist/cli.js
CHANGED
|
@@ -133,7 +133,8 @@ async function checkForUpdates(cli, askYesNoFn) {
|
|
|
133
133
|
cli.info('Updating devchain...');
|
|
134
134
|
try {
|
|
135
135
|
// Try without sudo first (works for nvm/fnm/Windows)
|
|
136
|
-
|
|
136
|
+
// Use npm install -g instead of update -g (update can remove packages)
|
|
137
|
+
execSync(`npm install -g ${packageName}@latest`, { stdio: 'inherit' });
|
|
137
138
|
cli.success('Update complete! Please restart devchain.');
|
|
138
139
|
process.exit(0);
|
|
139
140
|
} catch (e) {
|
|
@@ -141,14 +142,14 @@ async function checkForUpdates(cli, askYesNoFn) {
|
|
|
141
142
|
if (platform() !== 'win32') {
|
|
142
143
|
cli.info('Retrying with sudo...');
|
|
143
144
|
try {
|
|
144
|
-
execSync(`sudo npm
|
|
145
|
+
execSync(`sudo npm install -g ${packageName}@latest`, { stdio: 'inherit' });
|
|
145
146
|
cli.success('Update complete! Please restart devchain.');
|
|
146
147
|
process.exit(0);
|
|
147
148
|
} catch (e2) {
|
|
148
|
-
cli.error('Update failed. You can manually run: sudo npm
|
|
149
|
+
cli.error('Update failed. You can manually run: sudo npm install -g ' + packageName);
|
|
149
150
|
}
|
|
150
151
|
} else {
|
|
151
|
-
cli.error('Update failed. You can manually run: npm
|
|
152
|
+
cli.error('Update failed. You can manually run: npm install -g ' + packageName);
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devchain-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "AI driven development platform",
|
|
5
5
|
"homepage": "https://devchain.twitechlab.com/",
|
|
6
6
|
"repository": {
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"url": "https://github.com/twitech-lab/devchain.git"
|
|
9
9
|
},
|
|
10
10
|
"changelog": {
|
|
11
|
+
"0.4.3": [
|
|
12
|
+
"Fix auto-update removing package instead of updating"
|
|
13
|
+
],
|
|
11
14
|
"0.4.2": [
|
|
12
15
|
"Fix @devchain/shared module not found when installed globally",
|
|
13
16
|
"Fix CLI version command showing incorrect version"
|