void (@NotNull List<String> args) { if (Boolean.getBoolean(AppMode.FORCE_PLUGIN_UPDATES)) { log("Updates applied."); System.exit(0); } Collection<PluginDownloader> availableUpdates = UpdateChecker.getInternalPluginUpdates() .getPluginUpdates() .getAllEnabled(); if (availableUpdates.isEmpty()) { log("All plugins up to date."); System.exit(0); return; } Collection<PluginDownloader> pluginsToUpdate; if (args.size() > 1) { Set<String> filter = new HashSet<>(args.subList(1, args.size())); pluginsToUpdate = availableUpdates.stream() .filter(downloader -> filter.contains(downloader.getId().getIdString())) .toList(); } else { pluginsToUpdate = availableUpdates; } log("Plugins to update:"); pluginsToUpdate.forEach(d -> log("\t" + d.getPluginName())); Ref<Boolean> installed = Ref.create(); PluginDownloader.runSynchronouslyInBackground(() -> { installed.set(UpdateInstaller.installPluginUpdates(pluginsToUpdate, new EmptyProgressIndicator())); }); if (installed.get()) { System.exit(0); } else { log("Update failed"); System.exit(1); } }