mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-23 22:26:13 +00:00
fix(cursor): save credentials after auto-detect and fix signal hang
- handleAuth() now calls saveCredentials() after successful auto-detect - Handle code === null (signal kill) in daemon exit handler to prevent promise from hanging indefinitely - Remove unnecessary await on synchronous functions
This commit is contained in:
@@ -207,9 +207,14 @@ export async function startDaemon(
|
||||
});
|
||||
});
|
||||
|
||||
proc.on('exit', (code) => {
|
||||
proc.on('exit', (code, signal) => {
|
||||
clearInterval(checkInterval);
|
||||
if (code === 0) {
|
||||
if (code === null) {
|
||||
resolve({
|
||||
success: false,
|
||||
error: `Daemon process was killed by signal ${signal}`,
|
||||
});
|
||||
} else if (code === 0) {
|
||||
resolve({
|
||||
success: false,
|
||||
error: 'Daemon process exited unexpectedly with code 0',
|
||||
|
||||
Reference in New Issue
Block a user