Skip to content

Commit 1f86780

Browse files
authored
Allow configurable Fabric meta base URL (#692)
1 parent 58e23f4 commit 1f86780

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/me/itzg/helpers/fabric/InstallFabricLoaderCommand.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ public class InstallFabricLoaderCommand implements Callable<Integer> {
3131
@Option(names = "--force-reinstall", description = "Force reinstall of the loader even if it already exists")
3232
boolean forceReinstall;
3333

34+
@Option(names = "--fabric-meta-base-url",
35+
defaultValue = "${env:FABRIC_META_BASE_URL:-https://meta.fabricmc.net}",
36+
description = "Base URL for Fabric meta API. Default: ${DEFAULT-VALUE}")
37+
String fabricMetaBaseUrl;
38+
3439
@ArgGroup
3540
OriginOptions originOptions = new OriginOptions();
3641

@@ -90,6 +95,10 @@ public Integer call() throws Exception {
9095
final FabricLauncherInstaller installer = new FabricLauncherInstaller(outputDirectory)
9196
.setResultsFile(resultsFile)
9297
.setForceReinstall(forceReinstall);
98+
99+
if (fabricMetaBaseUrl != null) {
100+
installer.setFabricMetaBaseUrl(fabricMetaBaseUrl);
101+
}
93102

94103
if (originOptions.fromUri != null) {
95104
installer.installUsingUri(sharedFetchArgs.options(), originOptions.fromUri);

0 commit comments

Comments
 (0)