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.
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user