boolean (@NotNull Project project, @Nullable String executable) { try { if (StringUtil.isEmptyOrSpaces(executable)) { return false; } HgCommandResult result = getVersionOutput(project, executable); return result.getExitValue() == 0 && !result.getRawOutput().isEmpty(); } catch (Throwable e) { LOG.info("Error during hg executable validation: ", e); return false; } }