mirror of https://github.com/aminya/setup-cpp.git
fix: add the llvm bin dir to path for brew
This commit is contained in:
parent
eab64e395d
commit
4b9980f829
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
|
|
@ -36,7 +36,7 @@ export async function brewPackInstallDir(name: string, version: string | undefin
|
|||
async function getBrewPackPrefix(packArg: string) {
|
||||
try {
|
||||
const brewPath = getBrewBinPath()
|
||||
return (await execa(brewPath, ["--prefix", packArg], { stdio: ["pipe", "inherit", "inherit"] })).stdout
|
||||
return (await execa(brewPath, ["--prefix", packArg], { stdio: "pipe" })).stdout
|
||||
} catch {
|
||||
return undefined
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { warning } from "ci-log"
|
||||
import { addPath } from "envosman"
|
||||
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) {
|
||||
|
|
@ -15,7 +17,12 @@ export function trySetupLLVMBrew(version: string, _setupDir: string, _arch: stri
|
|||
}
|
||||
}
|
||||
|
||||
export function setupLLVMBrew(version: string, _setupDir: string, _arch: string) {
|
||||
export async function setupLLVMBrew(version: string, _setupDir: string, _arch: string) {
|
||||
const majorVersion = majorLLVMVersion(version)
|
||||
return installBrewPack("llvm", `${majorVersion}`)
|
||||
const installInfo = await installBrewPack("llvm", `${majorVersion}`)
|
||||
|
||||
// add the bin directory to the PATH
|
||||
await addPath(installInfo.binDir, rcOptions)
|
||||
|
||||
return installInfo
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue