diff --git a/src/main/java/net/minecraftforge/installer/SimpleInstaller.java b/src/main/java/net/minecraftforge/installer/SimpleInstaller.java index 7ad95e7..fdf4431 100644 --- a/src/main/java/net/minecraftforge/installer/SimpleInstaller.java +++ b/src/main/java/net/minecraftforge/installer/SimpleInstaller.java @@ -36,6 +36,7 @@ public class SimpleInstaller { public static boolean headless = false; public static boolean debug = false; + public static boolean skipHashCheck = false; public static URL mirror = null; public static void main(String[] args) throws IOException, URISyntaxException { @@ -73,6 +74,7 @@ public static void main(String[] args) throws IOException, URISyntaxException { OptionSpec helpOption = parser.acceptsAll(Arrays.asList("h", "help"),"Help with this installer"); OptionSpec offlineOption = parser.accepts("offline", "Don't attempt any network calls"); OptionSpec debugOption = parser.accepts("debug", "Run in debug mode -- don't delete any files"); + OptionSpec skipHashCheckOption = parser.accepts("skipHashCheck", "skips the hash check when verifing outputs"); OptionSpec mirrorOption = parser.accepts("mirror", "Use a specific mirror URL").withRequiredArg().ofType(URL.class); OptionSet optionSet = parser.parse(args); @@ -84,6 +86,7 @@ public static void main(String[] args) throws IOException, URISyntaxException { debug = optionSet.has(debugOption); if (optionSet.has(mirrorOption)) mirror = optionSet.valueOf(mirrorOption); + skipHashCheck = optionSet.has(skipHashCheckOption); String badCerts = ""; if (optionSet.has(offlineOption) || SimpleInstaller.class.getResource("/" + OfflineAction.OFFLINE_FLAG) != null) { diff --git a/src/main/java/net/minecraftforge/installer/actions/PostProcessors.java b/src/main/java/net/minecraftforge/installer/actions/PostProcessors.java index 99040a6..6bdd286 100644 --- a/src/main/java/net/minecraftforge/installer/actions/PostProcessors.java +++ b/src/main/java/net/minecraftforge/installer/actions/PostProcessors.java @@ -234,7 +234,7 @@ public Set process(File librariesDir, File minecraft, File root, File inst ret.add(output.file); if (!output.file.exists()) { err.append("\n ").append(output.file).append(" missing"); - } else { + } else if (!SimpleInstaller.skipHashCheck) { String sha = DownloadUtils.getSha1(output.file); if (sha.equals(output.sha1)) { log(" Output: " + output.file + " Checksum Validated: " + sha);