fix: repot time in case of a failure

This commit is contained in:
Amin Yahyaabadi 2022-04-18 03:27:21 -07:00
parent 4ff35803b1
commit 8e9737776a
3 changed files with 5 additions and 3 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -168,12 +168,12 @@ export async function main(args: string[]): Promise<number> {
// installing the specified compiler
const maybeCompiler = opts.compiler
time1 = new Date(Date.now())
try {
if (maybeCompiler !== undefined) {
const { compiler, version } = getCompilerInfo(maybeCompiler)
// install the compiler. We allow some aliases for the compiler name
time1 = new Date(Date.now())
startGroup(`Installing ${compiler} ${version ?? ""}`)
switch (compiler) {
case "llvm":
@ -222,6 +222,8 @@ export async function main(args: string[]): Promise<number> {
error(e as string | Error)
errorMessages.push(`Failed to install the ${maybeCompiler}`)
endGroup()
time2 = new Date(Date.now())
info(`took ${timeFormatter.format(time1, time2) as string}`)
}
if (successMessages.length === 0 && errorMessages.length === 0) {