mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-16 13:06:55 +08:00
Compare commits
2 Commits
windows-be
...
releases/v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b9b1d2cd2 | ||
|
|
6fd5c3fbaf |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
__tests__/runner/*
|
__tests__/runner/*
|
||||||
dist/
|
!dist/
|
||||||
|
|||||||
5199
dist/index.js
vendored
Normal file
5199
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
dist/unzip
vendored
Normal file
BIN
dist/unzip
vendored
Normal file
Binary file not shown.
4
lib/installer.js
generated
4
lib/installer.js
generated
@@ -146,6 +146,10 @@ function getDownloadURL(fileInfo, version, arch) {
|
|||||||
if (version == 'nightly') {
|
if (version == 'nightly') {
|
||||||
return `${baseURL}/${getNightlyFileName(arch)}`;
|
return `${baseURL}/${getNightlyFileName(arch)}`;
|
||||||
}
|
}
|
||||||
|
// Verify that fileInfo.url points at the official Julia download servers
|
||||||
|
if (!fileInfo.url.startsWith('https://julialang-s3.julialang.org/')) {
|
||||||
|
throw new Error(`versions.json points at a download location outside of Julia's download server: ${fileInfo.url}. Aborting for security reasons.`);
|
||||||
|
}
|
||||||
return fileInfo.url;
|
return fileInfo.url;
|
||||||
}
|
}
|
||||||
exports.getDownloadURL = getDownloadURL;
|
exports.getDownloadURL = getDownloadURL;
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ export function getDownloadURL(fileInfo, version: string, arch: string): string
|
|||||||
return `${baseURL}/${getNightlyFileName(arch)}`
|
return `${baseURL}/${getNightlyFileName(arch)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Verify that fileInfo.url points at the official Julia download servers
|
||||||
|
if (!fileInfo.url.startsWith('https://julialang-s3.julialang.org/')) {
|
||||||
|
throw new Error(`versions.json points at a download location outside of Julia's download server: ${fileInfo.url}. Aborting for security reasons.`)
|
||||||
|
}
|
||||||
return fileInfo.url
|
return fileInfo.url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user