in src/main/java/org/jetbrains/uncrustify/util/UncrustifyExecutable.java [34:58]
public static void verify(@NotNull String path, @NotNull VerificationListener listener, boolean block) throws ExecutionException {
executeWithProcessListener(
path,
List.of("--version"),
null,
new CapturingProcessAdapter() {
public void processTerminated(@NotNull ProcessEvent event) {
super.processTerminated(event);
int exitCode = event.getExitCode();
ProcessOutput processOutput = getOutput();
if (exitCode == 0) {
String version = verifyVersion(processOutput.getStdout());
if (version != null) {
listener.onValid(version);
} else {
listener.onInvalid();
}
} else {
listener.onInvalid();
}
}
},
block);
}