docs: private Optional<RuntimeException> runCommands(String stage, List<String[]> commands) {
      if (commands == null) {
        return Optional.empty();
      }
      for (String[] command : commands) {
        try {
          LOG.info("{} command started: {}", stage, ProcessUtil.join(command));
          Process p = Runtime.getRuntime().exec(command, envp, dir);
          int exitCode = p.waitFor();
  
          String stdOut = ProcessUtil.getStdOut(p);
          String stdErr = ProcessUtil.getStdErr(p);
          if (!stdOut.isEmpty()) {
            LOG.info("STDOUT:\n" + stdOut);
          }
          if (!stdErr.isEmpty()) {
            LOG.info("STDERR:\n" + stdErr);
          }
  
          if (exitCode != 0) {
            return Optional.of(new IllegalArgumentException("Non-zero exit code: " + exitCode));
          }
        } catch (IOException e) {
          return Optional.of(new UncheckedIOException(e));
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          return Optional.of(new RuntimeException(e));
        }
      }
      return Optional.empty();
    }