private static void exec(GeneralCommandLine command, @Nls @Nullable String prompt) throws IOException, ExecutionException {
    command.setRedirectErrorStream(true);
    var result = new CapturingProcessHandler(prompt != null ? ExecUtil.sudoCommand(command, prompt) : command).runProcess();
    var exitCode = result.getExitCode();
    if (exitCode != 0) {
      var message = "Command '" + (prompt != null ? "sudo " : "") + command.getCommandLineString() + "' returned " + exitCode;
      var output = result.getStdout();
      if (!output.isBlank()) message += "\nOutput: " + output.trim();
      throw new RuntimeException(message);
    }
  }
private static void exec(GeneralCommandLine command, @Nls @Nullable String prompt)