fix: use info instead of notice for version coercion

This commit is contained in:
Amin Yahyaabadi 2022-05-03 22:06:04 -07:00
parent 28c08c8f96
commit 6edc7f9498
4 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

@ -289,7 +289,7 @@ export function getCompilerInfo(maybeCompiler: string) {
if (semverValid(maybeVersion) !== null) {
return { compiler, version: maybeVersion }
} else {
notice(`Invalid semver version ${maybeVersion} used for the compiler.`)
info(`Invalid semver version ${maybeVersion} used for the compiler.`)
return { compiler, version: maybeVersion }
}
}

View File

@ -3,6 +3,7 @@ import semverCompare from "semver/functions/compare"
import semverCoerce from "semver/functions/coerce"
import semverValid from "semver/functions/valid"
import { getExecOutput } from "@actions/exec"
import { info } from "../io/io"
/**
* Gets the specific versions supported by this action compatible with the supplied (specific or minimum) version in
@ -96,6 +97,7 @@ export function semverCoerceIfInvalid(version: string) {
// find the semver version of an integer
const coercedVersion = semverCoerce(version)
if (coercedVersion !== null) {
info(`Coerced version '${version}' to '${coercedVersion}'`)
return coercedVersion.version
}
} catch (err) {