diff --git a/lib/setup-julia.js b/lib/setup-julia.js index 9863b10..430baae 100644 --- a/lib/setup-julia.js +++ b/lib/setup-julia.js @@ -58,12 +58,14 @@ function getJuliaVersion(versionInput) { // versionInput is a valid version, use it directly return versionInput; } - // use the highest available version that matches versionInput + // Use the highest available version that matches versionInput const releases = yield 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; }); } diff --git a/src/setup-julia.ts b/src/setup-julia.ts index a098030..404add3 100644 --- a/src/setup-julia.ts +++ b/src/setup-julia.ts @@ -47,13 +47,16 @@ async function getJuliaVersion(versionInput: string): Promise { 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 }