Files
rea/tests/fixtures/ibtool.ts
TonyWu 7bc57e1e64 test(apple): skip ibtool-compiled NIB tests when Xcode ibtool is unavailable (#2070)
Command Line Tools install the /usr/bin/ibtool and xcrun shims without ibtool itself, so the existing /usr/bin/ibtool existence guard never skipped the storyboard test, and the native NIB hierarchy suite had no guard. On a Command Line Tools-only macOS host these seven tests failed at fixture compilation. Probe xcrun --find ibtool once and use it for both suites.
2026-10-13 06:07:16 +09:00

12 lines
447 B
TypeScript

import { spawnSync } from "node:child_process";
/**
* Whether Xcode's ibtool can compile Interface Builder sources on this host.
* Command Line Tools install the /usr/bin/ibtool and xcrun shims without the
* tool itself, so probe resolution instead of checking the shim path.
*/
export const xcodeIbtoolAvailable =
process.platform === "darwin" &&
spawnSync("/usr/bin/xcrun", ["--find", "ibtool"], { stdio: "ignore" })
.status === 0;