(
runCommand: (command: string[]) => Promise<{ success: boolean; output: string }>,
)
| 249 | } |
| 250 | |
| 251 | export async function getXcodeVersionMetadata( |
| 252 | runCommand: (command: string[]) => Promise<{ success: boolean; output: string }>, |
| 253 | ): Promise<XcodeVersionMetadata> { |
| 254 | const metadata: XcodeVersionMetadata = {}; |
| 255 | |
| 256 | try { |
| 257 | const result = await runCommand(['xcodebuild', '-version']); |
| 258 | if (result.success) { |
| 259 | const parsed = parseXcodeVersionOutput(result.output); |
| 260 | metadata.version = parsed.version; |
| 261 | metadata.buildVersion = parsed.buildVersion; |
| 262 | } |
| 263 | } catch { |
| 264 | // ignore |
| 265 | } |
| 266 | |
| 267 | try { |
| 268 | const result = await runCommand(['xcode-select', '-p']); |
| 269 | if (result.success) { |
| 270 | metadata.developerDir = result.output.trim(); |
| 271 | } |
| 272 | } catch { |
| 273 | // ignore |
| 274 | } |
| 275 | |
| 276 | try { |
| 277 | const result = await runCommand(['xcrun', '--find', 'xcodebuild']); |
| 278 | if (result.success) { |
| 279 | metadata.xcodebuildPath = result.output.trim(); |
| 280 | } |
| 281 | } catch { |
| 282 | // ignore |
| 283 | } |
| 284 | |
| 285 | return metadata; |
| 286 | } |
| 287 | |
| 288 | export async function getAxeVersionMetadata( |
| 289 | runCommand: (command: string[]) => Promise<{ success: boolean; output: string }>, |
no test coverage detected