mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06: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) {
|
function requestedVersionFor(tool, version, originListing, mirrors) {
|
||||||
return (
|
const isStrictVersion = isStrictVersion()
|
||||||
`Requested ${tool} version (${version}) not found in version list, ` +
|
|
||||||
`at ${originListing}${mirrors ? `, with mirrors ${mirrors}` : ''}; ` +
|
let versionType = 'loose'
|
||||||
"should you be using option 'version-type': 'strict'?"
|
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']
|
const knownBranches = ['main', 'master', 'maint']
|
||||||
|
|||||||
+15
-5
@@ -191,11 +191,21 @@ async function getOTPVersion(otpSpec0, osVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function requestedVersionFor(tool, version, originListing, mirrors) {
|
function requestedVersionFor(tool, version, originListing, mirrors) {
|
||||||
return (
|
const isStrictVersion = isStrictVersion()
|
||||||
`Requested ${tool} version (${version}) not found in version list, ` +
|
|
||||||
`at ${originListing}${mirrors ? `, with mirrors ${mirrors}` : ''}; ` +
|
let versionType = 'loose'
|
||||||
"should you be using option 'version-type': 'strict'?"
|
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']
|
const knownBranches = ['main', 'master', 'maint']
|
||||||
|
|||||||
Reference in New Issue
Block a user