Interface NativeGitProvider.ProcessRunner

All Known Implementing Classes:
NativeGitProvider.JavaProcessRunner
Enclosing class:
NativeGitProvider

public static interface NativeGitProvider.ProcessRunner
  • Method Summary

    Modifier and Type
    Method
    Description
    run(File directory, long nativeGitTimeoutInMs, String command)
    Run a command and return the entire output as a String - naive, we know.
    boolean
    runEmpty(File directory, long nativeGitTimeoutInMs, String command)
    Run a command and return false if it contains at least one output line
  • Method Details

    • run

      String run(File directory, long nativeGitTimeoutInMs, String command) throws IOException, GitCommitIdExecutionException
      Run a command and return the entire output as a String - naive, we know.
      Parameters:
      directory - the directory where the command should be executed in
      nativeGitTimeoutInMs - the timeout in milliseconds before the command get's terminated
      command - the command to execute
      Returns:
      the output obtained from stdout by running the command
      Throws:
      IOException - if any underlying IOError occurred
      GitCommitIdExecutionException - the command execution failed
    • runEmpty

      boolean runEmpty(File directory, long nativeGitTimeoutInMs, String command) throws IOException, GitCommitIdExecutionException
      Run a command and return false if it contains at least one output line
      Parameters:
      directory - the directory where the command should be executed in
      nativeGitTimeoutInMs - the timeout in milliseconds before the command get's terminated
      command - the command to execute
      Returns:
      false if the output of the command contains at least one line on stdout, true otherwise
      Throws:
      IOException - if any underlying IOError occurred
      GitCommitIdExecutionException - the command execution failed