mirror of https://github.com/aminya/setup-cpp
Merge pull request #89 from aminya/cppcheck [skip ci]
This commit is contained in:
commit
e3d2d1fc9f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -17,7 +17,6 @@ const DefaultVersions: Record<string, string> = {
|
||||||
task: "3.12.1", // https://github.com/go-task/task/releases
|
task: "3.12.1", // https://github.com/go-task/task/releases
|
||||||
doxygen: process.platform === "darwin" ? "1.9.3" : "1.9.4", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
|
doxygen: process.platform === "darwin" ? "1.9.3" : "1.9.4", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
|
||||||
gcc: "11", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
gcc: "11", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
||||||
cppcheck: process.platform === "win32" ? "2.7" : "",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If an ubuntu versions is not in this map:
|
/// If an ubuntu versions is not in this map:
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { setupChocolatey } from "../../chocolatey/chocolatey"
|
||||||
import { InstallationInfo } from "./setupBin"
|
import { InstallationInfo } from "./setupBin"
|
||||||
import execa from "execa"
|
import execa from "execa"
|
||||||
import { info } from "@actions/core"
|
import { info } from "@actions/core"
|
||||||
|
import { notice } from "../io/io"
|
||||||
|
|
||||||
let hasChoco = false
|
let hasChoco = false
|
||||||
|
|
||||||
|
@ -32,7 +33,16 @@ export async function setupChocoPack(name: string, version?: string, args: strin
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
execa.sync("choco", ["install", "-y", name, ...args], { env, extendEnv: false, stdio: "inherit" })
|
execa.sync("choco", ["install", "-y", name, ...args], { env, extendEnv: false, stdio: "inherit" })
|
||||||
|
} catch (err) {
|
||||||
|
// if the package requires a reboot, downgrade the error to a notice
|
||||||
|
if ((err as Error).message.includes("exit code 3010")) {
|
||||||
|
notice(`${name} might require a reboot for the completion of the installation.`)
|
||||||
|
} else {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const binDir = `${process.env.ChocolateyInstall ?? "C:/ProgramData/chocolatey"}/bin`
|
const binDir = `${process.env.ChocolateyInstall ?? "C:/ProgramData/chocolatey"}/bin`
|
||||||
|
|
Loading…
Reference in New Issue