void (@NotNull ProgressIndicator indicator) { try { List<Pair<File, DownloadableFileDescription>> pairs = downloader.download(directory); Pair<File, DownloadableFileDescription> first = ContainerUtil.getFirstItem(pairs); File file = first != null ? first.first : null; if (file != null) { String path = decompressShellcheck(file, directory); if (StringUtil.isNotEmpty(path)) { FileUtil.setExecutable(new File(path)); ShSettings.setShellcheckPath(path); if (withReplace) { LOG.debug("Remove old shellcheck"); FileUtil.delete(oldShellcheck); } ApplicationManager.getApplication().invokeLater(onSuccess); EXTERNAL_ANNOTATOR_DOWNLOADED_EVENT_ID.log(); } } } catch (IOException e) { LOG.warn("Can't download shellcheck", e); if (withReplace) rollbackToOldShellcheck(shellcheck, oldShellcheck); ApplicationManager.getApplication().invokeLater(onFailure); } }