File tree Expand file tree Collapse file tree
src/main/java/org/mcphackers/mcp/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,19 +36,17 @@ protected Stage[] setStages() {
3636 boolean confirmed = mcp .updateDialogue (notes , latestVersion );
3737 if (confirmed ) {
3838 log ("Downloading update..." );
39- boolean downloaded = false ;
4039 for (Object obj : releaseJson .getJSONArray ("assets" )) {
4140 if (obj instanceof JSONObject ) {
4241 JSONObject assetObj = (JSONObject ) obj ;
4342 if (!assetObj .getString ("name" ).endsWith (mcp .isGUI () ? "-GUI.jar" : "-CLI.jar" )) {
4443 continue ;
4544 }
4645 FileUtil .downloadFile (assetObj .getString ("browser_download_url" ), Paths .get (MCPPaths .UPDATE_JAR ));
47- downloaded = true ;
4846 break ;
4947 }
5048 }
51- if (!downloaded ) {
49+ if (!Files . exists ( Paths . get ( MCPPaths . UPDATE_JAR )) ) {
5250 IOException t = new IOException ("No matching update asset found in release! Aborting" );
5351 Util .throwExceptionInIDE (t );
5452 throw t ;
You can’t perform that action at this time.
0 commit comments