Class CommandExecutor
- java.lang.Object
-
- org.eclipse.jgit.internal.diffmergetool.CommandExecutor
-
public class CommandExecutor extends Object
Runs a command with help of FS.
-
-
Constructor Summary
Constructors Constructor Description CommandExecutor(FS fs, boolean checkExitCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkExecutable(String path, File workingDir, Map<String,String> env)
FS.ExecutionResult
run(String command, File workingDir, Map<String,String> env)
-
-
-
Constructor Detail
-
CommandExecutor
public CommandExecutor(FS fs, boolean checkExitCode)
- Parameters:
fs
- the file systemcheckExitCode
- should the exit code be checked for errors ?
-
-
Method Detail
-
run
public FS.ExecutionResult run(String command, File workingDir, Map<String,String> env) throws ToolException, IOException, InterruptedException
- Parameters:
command
- the command stringworkingDir
- the working directoryenv
- the environment- Returns:
- the execution result
- Throws:
ToolException
InterruptedException
IOException
-
checkExecutable
public boolean checkExecutable(String path, File workingDir, Map<String,String> env) throws ToolException, IOException, InterruptedException
- Parameters:
path
- the executable pathworkingDir
- the working directoryenv
- the environment- Returns:
- the execution result
- Throws:
ToolException
InterruptedException
IOException
-
-