mirror of https://github.com/aminya/setup-cpp
fix: fix apt-cache show and use gcc 11 on Ubuntu 20
This commit is contained in:
parent
fbb91d5a68
commit
9c18ad87a1
|
@ -12,6 +12,8 @@ ignorePaths:
|
||||||
words:
|
words:
|
||||||
- aarch
|
- aarch
|
||||||
- clangd
|
- clangd
|
||||||
|
- Trofimovich
|
||||||
|
- cobertura
|
||||||
- aminya
|
- aminya
|
||||||
- applellvm
|
- applellvm
|
||||||
- bazel
|
- bazel
|
||||||
|
|
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
|
@ -67,10 +67,14 @@ async function getAptArg(name: string, version: string | undefined) {
|
||||||
if (stdout.trim() !== "") {
|
if (stdout.trim() !== "") {
|
||||||
return `${name}-${version}`
|
return `${name}-${version}`
|
||||||
} else {
|
} else {
|
||||||
// check if apt-get show can find the version
|
try {
|
||||||
const { stdout: showStdout } = await execa("apt-cache", ["show", `${name}=${version}`])
|
// check if apt-get show can find the version
|
||||||
if (showStdout.trim() === "") {
|
const { stdout: showStdout } = await execa("apt-cache", ["show", `${name}=${version}`])
|
||||||
return `${name}=${version}`
|
if (showStdout.trim() === "") {
|
||||||
|
return `${name}=${version}`
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
}
|
}
|
||||||
warning(`Failed to install ${name} ${version} via apt, trying without version`)
|
warning(`Failed to install ${name} ${version} via apt, trying without version`)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ export const DefaultVersions: Record<string, string> = {
|
||||||
export const DefaultLinuxVersion: Record<string, Record<number, string>> = {
|
export const DefaultLinuxVersion: Record<string, Record<number, string>> = {
|
||||||
gcc: {
|
gcc: {
|
||||||
22: "13",
|
22: "13",
|
||||||
20: "13",
|
20: "11",
|
||||||
18: "11",
|
18: "11",
|
||||||
16: "11",
|
16: "11",
|
||||||
14: "11",
|
14: "11",
|
||||||
|
|
Loading…
Reference in New Issue