mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 11:06:53 +08:00
Remove trailing v from versions before download
This commit is contained in:
@@ -47,13 +47,16 @@ async function getJuliaVersion(versionInput: string): Promise<string> {
|
||||
return versionInput
|
||||
}
|
||||
|
||||
// use the highest available version that matches versionInput
|
||||
// Use the highest available version that matches versionInput
|
||||
const releases = await getJuliaReleases()
|
||||
const version = semver.maxSatisfying(releases, versionInput)
|
||||
let version = semver.maxSatisfying(releases, versionInput)
|
||||
if (version == null) {
|
||||
throw `Could not find a Julia version that matches ${versionInput}`
|
||||
}
|
||||
|
||||
// GitHub tags start with v, remove it
|
||||
version = version.replace(/^v/, '')
|
||||
|
||||
return version
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user