bcecd675f7
Show a Restart backend action that kills the SSH serve before the local child so reconnect cannot reuse a stale lockfile, instead of dumping raw IPC JSON.
13 lines
378 B
TypeScript
13 lines
378 B
TypeScript
/** True when a backend error is the post-update stale-module 503 (#97046). */
|
|
export function isCodeSkewRestartRequired(error: unknown): boolean {
|
|
return /Restart required:/i.test(errorText(error))
|
|
}
|
|
|
|
function errorText(error: unknown): string {
|
|
if (error instanceof Error) {
|
|
return error.message
|
|
}
|
|
|
|
return typeof error === 'string' ? error : String(error ?? '')
|
|
}
|