fix(cli): restart cli for manual update
This commit is contained in:
parent
e1a996021e
commit
595986a6fb
1 changed files with 3 additions and 5 deletions
|
|
@ -170,17 +170,15 @@ export class UpdateService extends BaseService<UpdateServiceState> {
|
|||
|
||||
this.setState({
|
||||
status: UpdateStatus.UPDATED,
|
||||
message: `${isAutoUpdate ? "Auto-updated to" : "Restart for"} v${this.currentState.latestVersion}`,
|
||||
message: `Updated to v${this.currentState.latestVersion}`,
|
||||
isUpdateAvailable: false,
|
||||
});
|
||||
if (isAutoUpdate) {
|
||||
this.restartCLI();
|
||||
}
|
||||
this.restartCLI();
|
||||
} catch (error: any) {
|
||||
logger.error("Error updating CLI:", error);
|
||||
this.setState({
|
||||
status: UpdateStatus.ERROR,
|
||||
message: isAutoUpdate ? "Auto-update failed" : "Update failed",
|
||||
message: "Update failed",
|
||||
error,
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue