Skip to content

Commit

Permalink
Attempt fix for the other issue in #59
Browse files Browse the repository at this point in the history
  • Loading branch information
triphora committed Nov 17, 2023
1 parent 41d19e6 commit 814aff2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/java/com/modrinth/minotaur/TaskModrinthUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,15 @@ && getProject().getExtensions().findByName("loom") != null) {
String[] props = {"MC_VERSION", "minecraftVersion"};

for (String prop : props) {
String version = (String) getProject().getExtensions().getExtraProperties().get(prop);
if (version != null) {
getLogger().debug("Adding fallback game version {} from ForgeGradle/NeoGradle.", version);
add(ext.getGameVersions(), version);
break;
try {
String version = (String) getProject().getExtensions().getExtraProperties().get(prop);
if (version != null) {
getLogger().debug("Adding fallback game version {} from ForgeGradle/NeoGradle.", version);
add(ext.getGameVersions(), version);
break;
}
} catch (Exception e) {
getLogger().debug("Could not find property {}", prop);
}
}
}
Expand Down

0 comments on commit 814aff2

Please sign in to comment.