Skip to content

Commit

Permalink
FIXED: Error of fetching a file from a zip, after it has been closed
Browse files Browse the repository at this point in the history
FIXED: Default 'manifest-source' parameter
  • Loading branch information
WinPlay02 committed Jul 26, 2024
1 parent 3e857ad commit 260b3ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class GitCraftCli {
cli_args._(longOpt: 'create-version-branches', 'Creates a separate branch for each version, including linear versions. This may be useful for quickly switching between multiple versions.')
cli_args._(longOpt: 'create-stable-version-branches', 'Creates a separate branch for each stable linear version. This may be useful for quickly switching between multiple versions.')
cli_args._(longOpt: 'sort-json', 'Sorts JSON objects contained in JSON files (e.g. models, language files, ...) in natural order. This is disabled by default as it modifies original data.')
cli_args._(longOpt: 'manifest-source', "Specifies the manifest source used to fetch the available versions, the mapping to semantic versions and the dependencies between versions. The Minecraft Launcher Meta (from Mojang) is selected by default. Possible values are: ${Arrays.stream(ManifestSource.values()).map(Object::toString).collect(Collectors.joining(", "))}", type: ManifestSource, argName: "mapping", defaultValue: "mojang_minecraft_launcher");
cli_args._(longOpt: 'manifest-source', "Specifies the manifest source used to fetch the available versions, the mapping to semantic versions and the dependencies between versions. The Minecraft Launcher Meta (from Mojang) is selected by default. Possible values are: ${Arrays.stream(ManifestSource.values()).map(Object::toString).collect(Collectors.joining(", "))}", type: ManifestSource, argName: "mapping", defaultValue: "mojang");
cli_args.h(longOpt: 'help', 'Displays this help screen');
return cli_args;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ protected final <T> T loadVersionMetadata(Path targetFile, Class<T> metadataClas
if (zipFile.isPresent()) {
targetFile = zipFile.get();
}
return SerializationHelper.deserialize(SerializationHelper.fetchAllFromPath(targetFile), metadataClass);
}
} else {
MiscHelper.panic("unknown metadata file extension: %s", targetFile);
Expand Down

0 comments on commit 260b3ca

Please sign in to comment.