fix: error handling in restore failure reporting

This commit is contained in:
Shakker
2026-02-03 06:22:51 +00:00
parent 1b31e2f345
commit e9f182def7

View File

@@ -8,11 +8,7 @@ function reportRestoreFailure(scope: string, err: unknown, reason?: string): voi
try {
process.stderr.write(`${message}\n`);
} catch (writeErr) {
try {
console.error(`[terminal] restore reporting failed${suffix}: ${String(writeErr)}`);
} catch (consoleErr) {
throw consoleErr;
}
console.error(`[terminal] restore reporting failed${suffix}: ${String(writeErr)}`);
}
}