mirror of https://github.com/aminya/setup-cpp.git
fix: force installing LLVM via bottles
This commit is contained in:
parent
4b9980f829
commit
4532f2e61b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -4,13 +4,13 @@ import { installBrewPack } from "setup-brew"
|
|||
import { rcOptions } from "../cli-options.ts"
|
||||
import { majorLLVMVersion } from "./utils.ts"
|
||||
|
||||
export function trySetupLLVMBrew(version: string, _setupDir: string, _arch: string) {
|
||||
export async function trySetupLLVMBrew(version: string, _setupDir: string, _arch: string) {
|
||||
if (process.platform !== "darwin") {
|
||||
return Promise.resolve(undefined)
|
||||
}
|
||||
|
||||
try {
|
||||
return setupLLVMBrew(version, _setupDir, _arch)
|
||||
return await setupLLVMBrew(version, _setupDir, _arch)
|
||||
} catch (err) {
|
||||
warning(`Failed to install llvm via brew: ${err}`)
|
||||
return undefined
|
||||
|
|
@ -19,7 +19,9 @@ export function trySetupLLVMBrew(version: string, _setupDir: string, _arch: stri
|
|||
|
||||
export async function setupLLVMBrew(version: string, _setupDir: string, _arch: string) {
|
||||
const majorVersion = majorLLVMVersion(version)
|
||||
const installInfo = await installBrewPack("llvm", `${majorVersion}`)
|
||||
|
||||
// install llvm via brew if a bottle is available for it
|
||||
const installInfo = await installBrewPack("llvm", `${majorVersion}`, { "force-bottle": true })
|
||||
|
||||
// add the bin directory to the PATH
|
||||
await addPath(installInfo.binDir, rcOptions)
|
||||
|
|
|
|||
Loading…
Reference in New Issue