mirror of https://github.com/aminya/setup-cpp
fix: use setupCppDir inside setupLLVM
This commit is contained in:
parent
b9ce5945b7
commit
3dd8e43133
|
@ -230,26 +230,17 @@ async function getLLVMPackageInfo(version: string, platform: NodeJS.Platform): P
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_NIX_DIRECTORY = "./llvm"
|
// const DEFAULT_UNIX_DIRECTORY = "./llvm"
|
||||||
const DEFAULT_WIN32_DIRECTORY = "C:/Program Files/LLVM"
|
// const DEFAULT_WIN32_DIRECTORY = "C:/Program Files/LLVM"
|
||||||
|
|
||||||
export async function setupLLVM(
|
export async function setupLLVM(
|
||||||
version: string,
|
version: string,
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
setupCppDir: string,
|
||||||
_setupCppDir: string | undefined,
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
_arch: string
|
_arch: string
|
||||||
): Promise<InstallationInfo> {
|
): Promise<InstallationInfo> {
|
||||||
let directory = _setupCppDir
|
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, setupCppDir)
|
||||||
if (directory === "" || directory === undefined) {
|
await activateLLVM(setupCppDir, version)
|
||||||
directory = process.platform === "win32" ? DEFAULT_WIN32_DIRECTORY : DEFAULT_NIX_DIRECTORY
|
|
||||||
}
|
|
||||||
|
|
||||||
directory = path.resolve(directory)
|
|
||||||
|
|
||||||
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, directory)
|
|
||||||
|
|
||||||
await activateLLVM(directory, version)
|
|
||||||
return installationInfo
|
return installationInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue