mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 01:21:10 -07:00
fix(cli): wait for background auto-update before relaunching (#20904)
This commit is contained in:
committed by
GitHub
parent
f15bcaf499
commit
e5207eb67f
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
import { runExitCleanup } from './cleanup.js';
|
||||
import { waitForUpdateCompletion } from './handleAutoUpdate.js';
|
||||
|
||||
/**
|
||||
* Exit code used to signal that the CLI should be relaunched.
|
||||
@@ -15,6 +16,7 @@ export const RELAUNCH_EXIT_CODE = 199;
|
||||
* Exits the process with a special code to signal that the parent process should relaunch it.
|
||||
*/
|
||||
export async function relaunchApp(): Promise<void> {
|
||||
await waitForUpdateCompletion();
|
||||
await runExitCleanup();
|
||||
process.exit(RELAUNCH_EXIT_CODE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user