mirror of https://github.com/aminya/setup-cpp
fix: set the sdk to macosx
This commit is contained in:
parent
16b25286f9
commit
7fdcafd805
|
@ -7,6 +7,7 @@ import { InstallationInfo, PackageInfo, setupBin } from "../utils/setup/setupBin
|
||||||
import { extractExe, extractTarByExe } from "../utils/setup/extract"
|
import { extractExe, extractTarByExe } from "../utils/setup/extract"
|
||||||
import { getSpecificVersionAndUrl, getVersions } from "../utils/setup/version"
|
import { getSpecificVersionAndUrl, getVersions } from "../utils/setup/version"
|
||||||
import { getExecOutput } from "@actions/exec"
|
import { getExecOutput } from "@actions/exec"
|
||||||
|
import { existsSync } from "fs"
|
||||||
|
|
||||||
//================================================
|
//================================================
|
||||||
// Version
|
// Version
|
||||||
|
@ -268,9 +269,11 @@ export async function setupLLVM(version: string, directoryGiven?: string): Promi
|
||||||
|
|
||||||
if (process.platform === "darwin") {
|
if (process.platform === "darwin") {
|
||||||
try {
|
try {
|
||||||
const xcrun = await getExecOutput("xcrun --sdk macos --show-sdk-path")
|
const xcrun = await getExecOutput("xcrun --sdk macosx --show-sdk-path")
|
||||||
const sdkroot = xcrun.stdout || xcrun.stderr
|
const sdkroot = xcrun.stdout || xcrun.stderr
|
||||||
|
if (existsSync(sdkroot)) {
|
||||||
core.exportVariable("SDKROOT", sdkroot)
|
core.exportVariable("SDKROOT", sdkroot)
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.error(e as Error | string)
|
core.error(e as Error | string)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue