UNPKG

setup-cpp

Version:

Install all the tools required for building and testing C++/C projects.

21 lines (19 loc) 571 B
import { getExecOutput } from "@actions/exec" import { error } from "ci-log" import { addEnv } from "envosman" import { rcOptions } from "../options.js" export async function setupMacOSSDK() { if (process.platform === "darwin") { try { const xcrun = await getExecOutput("xcrun --sdk macosx --show-sdk-path") const sdkroot = xcrun.stdout || xcrun.stderr if (sdkroot) { await addEnv("SDKROOT", sdkroot.trim(), rcOptions) } else { error("SDKROOT not set") } } catch (e) { error(e as Error | string) } } }