mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 16:03:20 +00:00
17 lines
487 B
TypeScript
17 lines
487 B
TypeScript
export function isStableMissingGitRemoteError(error: unknown): boolean {
|
|
const parts: string[] = []
|
|
if (error instanceof Error) {
|
|
parts.push(error.message)
|
|
}
|
|
if (typeof error === 'object' && error !== null && 'stderr' in error) {
|
|
const stderr = (error as { stderr?: unknown }).stderr
|
|
if (typeof stderr === 'string') {
|
|
parts.push(stderr)
|
|
}
|
|
}
|
|
if (parts.length === 0) {
|
|
parts.push(String(error))
|
|
}
|
|
return /no such remote/i.test(parts.join('\n'))
|
|
}
|