mirror of https://github.com/aminya/setup-cpp
fix: coerce semver before taking the major
This commit is contained in:
parent
48779980ad
commit
b964951e50
|
@ -4,6 +4,7 @@ import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import semverMajor from "semver/functions/major"
|
import semverMajor from "semver/functions/major"
|
||||||
|
import semverCoerce from "semver/functions/coerce"
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export async function setupGcc(version: string, _setupCppDir: string, arch: string) {
|
export async function setupGcc(version: string, _setupCppDir: string, arch: string) {
|
||||||
|
@ -50,7 +51,7 @@ export async function setupGcc(version: string, _setupCppDir: string, arch: stri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (binDir !== undefined) {
|
if (binDir !== undefined) {
|
||||||
const majorVersion = semverMajor(version)
|
const majorVersion = semverMajor(semverCoerce(version) ?? version)
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// const ld = process.env.LD_LIBRARY_PATH ?? ""
|
// const ld = process.env.LD_LIBRARY_PATH ?? ""
|
||||||
|
|
Loading…
Reference in New Issue