mirror of
https://github.com/stablyai/orca.git
synced 2026-10-21 00:03:46 +00:00
Reduce Git refresh subprocess fanout (#6324)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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'))
|
||||
}
|
||||
Reference in New Issue
Block a user