Actually implement the mirror restriction
Forgot to actually do this, oopsie
This commit is contained in:
@@ -39,6 +39,9 @@ async function downloadFromMirror(mirror, tarball_name, tarball_ext) {
|
||||
|
||||
async function downloadTarball(tarball_name, tarball_ext) {
|
||||
const preferred_mirror = core.getInput('mirror');
|
||||
if (preferred_mirror.includes("://ziglang.org/")) {
|
||||
throw new Error("'https://ziglang.org' cannot be used as mirror override; for more information see README.md");
|
||||
}
|
||||
if (preferred_mirror) {
|
||||
core.info(`Using mirror: ${preferred_mirror}`);
|
||||
return await downloadFromMirror(preferred_mirror, tarball_name, tarball_ext);
|
||||
|
||||
Reference in New Issue
Block a user