mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
Throw an informative error for non-existent version (#86)
* Throw an informative error for non-existent version * npm install && npm run build
This commit is contained in:
6
lib/installer.js
generated
6
lib/installer.js
generated
@@ -124,15 +124,19 @@ function getNightlyFileName(arch) {
|
||||
return `julia-latest${versionExt}.${ext}`;
|
||||
}
|
||||
function getFileInfo(versionInfo, version, arch) {
|
||||
const err = `Could not find ${archMap[arch]}/${version} binaries`;
|
||||
if (version.endsWith('nightly')) {
|
||||
return null;
|
||||
}
|
||||
if (!versionInfo[version]) {
|
||||
throw err;
|
||||
}
|
||||
for (let file of versionInfo[version].files) {
|
||||
if (file.os == osMap[osPlat] && file.arch == archMap[arch]) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
throw `Could not find ${archMap[arch]}/${version} binaries`;
|
||||
throw err;
|
||||
}
|
||||
exports.getFileInfo = getFileInfo;
|
||||
function getDownloadURL(fileInfo, version, arch) {
|
||||
|
||||
Reference in New Issue
Block a user