fix: changing game version without alerting incompatibility
This commit is contained in:
@@ -112,7 +112,7 @@ public class DefaultDependencyManager extends AbstractDependencyManager {
|
||||
return removeLibraryAsync(baseVersion.resolvePreservingPatches(repository), libraryVersion.getLibraryId())
|
||||
.thenComposeAsync(version -> libraryVersion.getInstallTask(this, version))
|
||||
.thenApplyAsync(baseVersion::addPatch)
|
||||
.thenComposeAsync(repository::save).withStage(String.format("hmcl.install.%s:%s", libraryVersion.getLibraryId(), libraryVersion.getSelfVersion()));
|
||||
.withStage(String.format("hmcl.install.%s:%s", libraryVersion.getLibraryId(), libraryVersion.getSelfVersion()));
|
||||
}
|
||||
|
||||
public Task<Version> installLibraryAsync(Version oldVersion, Path installer) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class DefaultGameBuilder extends GameBuilder {
|
||||
stages.add(String.format("hmcl.install.%s:%s", remoteVersion.getLibraryId(), remoteVersion.getSelfVersion()));
|
||||
}
|
||||
|
||||
return libraryTask.whenComplete(exception -> {
|
||||
return libraryTask.thenComposeAsync(dependencyManager.getGameRepository()::save).whenComplete(exception -> {
|
||||
if (exception != null)
|
||||
dependencyManager.getGameRepository().removeVersionFromDisk(name);
|
||||
}).withStagesHint(stages);
|
||||
|
||||
Reference in New Issue
Block a user