mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
Improve output (around "Requested ... version") when we know input (#368)
Improve output when we know input
This commit is contained in:
committed by
GitHub
parent
b764149ef2
commit
542d9a8e62
Vendored
+15
-5
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user