Improve output (around "Requested ... version") when we know input (#368)

Improve output when we know input
This commit is contained in:
Paulo F. Oliveira
2026-02-28 14:07:39 +00:00
committed by GitHub
parent b764149ef2
commit 542d9a8e62
2 changed files with 30 additions and 10 deletions
+15 -5
View File
@@ -26066,11 +26066,21 @@ async function getOTPVersion(otpSpec0, osVersion) {
}
function requestedVersionFor(tool, version, originListing, mirrors) {
return (
`Requested ${tool} version (${version}) not found in version list, ` +
`at ${originListing}${mirrors ? `, with mirrors ${mirrors}` : ''}; ` +
"should you be using option 'version-type': 'strict'?"
)
const isStrictVersion = isStrictVersion()
let versionType = 'loose'
if (isStrictVersion) {
versionType = 'strict'
}
let ret =
`Requested ${versionType} ${tool} version (${version}) not found in version list, ` +
`at ${originListing}${mirrors ? `, with mirrors ${mirrors}` : ''}.`
if (!isStrictVersion) {
ret = `${ret} Should you be using option 'version-type': 'strict'?`
}
return ret
}
const knownBranches = ['main', 'master', 'maint']