mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
refactor(orcad): drop the toolchain probe's unread toolchainMissing verdict (#31875)
This commit is contained in:
@@ -30,16 +30,6 @@ const PACKAGE_MANAGER_HINTS: readonly { bin: string; install: string }[] = [
|
||||
type BuildToolchainStatus = {
|
||||
present: string[]
|
||||
packageManager: string | null
|
||||
// A node-pty source build needs make, Python, and a C++ compiler.
|
||||
toolchainMissing: boolean
|
||||
}
|
||||
|
||||
function hasCxxCompiler(present: ReadonlySet<string>): boolean {
|
||||
return present.has('g++') || present.has('c++') || present.has('clang++')
|
||||
}
|
||||
|
||||
function hasPython(present: ReadonlySet<string>): boolean {
|
||||
return present.has('python3') || present.has('python')
|
||||
}
|
||||
|
||||
// POSIX-sh probe: echo a `HAVE <tool>` line per resolvable build tool and a
|
||||
@@ -70,8 +60,7 @@ export function parseBuildToolchainProbe(output: string): BuildToolchainStatus {
|
||||
}
|
||||
return {
|
||||
present: PROBED_TOOLS.filter((tool) => present.has(tool)),
|
||||
packageManager,
|
||||
toolchainMissing: !present.has('make') || !hasCxxCompiler(present) || !hasPython(present)
|
||||
packageManager
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user