hedgequantx 1.2.111 → 1.2.112
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/package.json +1 -1
- package/src/app.js +3 -20
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -690,29 +690,12 @@ const handleUpdate = async () => {
|
|
|
690
690
|
|
|
691
691
|
// Update via npm
|
|
692
692
|
spinner.text = `Updating v${currentVersion} -> v${latestVersion}...`;
|
|
693
|
-
spinner.stop();
|
|
694
|
-
|
|
695
|
-
console.log();
|
|
696
|
-
console.log(chalk.cyan(' Run this command to update:'));
|
|
697
|
-
console.log();
|
|
698
|
-
console.log(chalk.yellow(` npm install -g hedgequantx@latest`));
|
|
699
|
-
console.log();
|
|
700
|
-
console.log(chalk.gray(' (Use sudo if permission denied)'));
|
|
701
|
-
console.log();
|
|
702
|
-
|
|
703
|
-
await inquirer.prompt([{ type: 'input', name: 'continue', message: 'Press Enter after update...' }]);
|
|
704
|
-
|
|
705
|
-
// Check if updated
|
|
706
693
|
try {
|
|
707
|
-
|
|
708
|
-
if (newVersion !== currentVersion) {
|
|
709
|
-
console.log(chalk.green(` [OK] Updated to v${newVersion}`));
|
|
710
|
-
console.log(chalk.cyan(' Restart HQX to apply changes.'));
|
|
711
|
-
}
|
|
694
|
+
exec('npm install -g hedgequantx@latest', { stdio: 'pipe' });
|
|
712
695
|
} catch (e) {
|
|
713
|
-
|
|
696
|
+
spinner.fail('Update failed - try manually: npm install -g hedgequantx@latest');
|
|
697
|
+
return;
|
|
714
698
|
}
|
|
715
|
-
return;
|
|
716
699
|
|
|
717
700
|
spinner.succeed('CLI updated!');
|
|
718
701
|
console.log();
|