@withone/cli 1.32.0 → 1.32.1
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/index.js +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -847,8 +847,16 @@ async function updateCommand() {
|
|
|
847
847
|
}
|
|
848
848
|
s.stop(`Update available: v${currentVersion} \u2192 v${latestVersion}`);
|
|
849
849
|
console.log(`Updating @withone/cli: v${currentVersion} \u2192 v${latestVersion}...`);
|
|
850
|
+
await new Promise((resolve) => {
|
|
851
|
+
const child = spawn("npm", ["cache", "clean", "--force"], {
|
|
852
|
+
stdio: "ignore",
|
|
853
|
+
shell: true
|
|
854
|
+
});
|
|
855
|
+
child.on("close", () => resolve());
|
|
856
|
+
child.on("error", () => resolve());
|
|
857
|
+
});
|
|
850
858
|
const code = await new Promise((resolve) => {
|
|
851
|
-
const child = spawn("npm", ["install", "-g",
|
|
859
|
+
const child = spawn("npm", ["install", "-g", `@withone/cli@${latestVersion}`, "--force"], {
|
|
852
860
|
stdio: isAgentMode() ? "pipe" : "inherit",
|
|
853
861
|
shell: true
|
|
854
862
|
});
|