Skip to content

Commit 20ba74b

Browse files
committed
Actually implement the mirror restriction
Forgot to actually do this, oopsie
1 parent 6897e29 commit 20ba74b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ async function downloadFromMirror(mirror, tarball_name, tarball_ext) {
3939

4040
async function downloadTarball(tarball_name, tarball_ext) {
4141
const preferred_mirror = core.getInput('mirror');
42+
if (preferred_mirror.includes("://ziglang.org/")) {
43+
throw new Error("'https://ziglang.org' cannot be used as mirror override; for more information see README.md");
44+
}
4245
if (preferred_mirror) {
4346
core.info(`Using mirror: ${preferred_mirror}`);
4447
return await downloadFromMirror(preferred_mirror, tarball_name, tarball_ext);

0 commit comments

Comments
 (0)