Skip to content

Commit 8011a99

Browse files
committed
Make downloading the version json not print the big cache miss message
1 parent c293685 commit 8011a99

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/main/java/net/minecraftforge/mcmaven/cli/MCPTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private static void writeFiles(MCPTaskFactory mcpTaskFactory, File output) {
269269
try {
270270
return mcpTaskFactory.findStep(step).execute().getAbsolutePath();
271271
} catch (Exception e) {
272-
LOGGER.error("Cannot serialize output path for MCP step: " + step);
272+
LOGGER.error("Cannot serialize output path for MCP step: " + step, e);
273273
return null;
274274
}
275275
}

src/main/java/net/minecraftforge/mcmaven/impl/repo/mcpconfig/MinecraftTasks.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,15 @@ private File downloadVersionJson() {
9393
if (target.exists() && cache.isSame())
9494
return target;
9595

96-
Mavenizer.assertNotCacheOnly();
96+
// The manifest doesn't contain anything we can key off off, so this happens often
97+
// Do don't do the big warn if we get here.
98+
if (Mavenizer.isCacheOnly())
99+
Mavenizer.assertNotCacheOnly();
100+
101+
// If we are offline, but the file exists, use it
102+
if (Mavenizer.isOffline() && target.exists())
103+
return target;
104+
97105
Mavenizer.assertOnline();
98106

99107
var manifest = JsonData.launcherManifest(manifestF);

0 commit comments

Comments
 (0)