Class CommandCaller
- java.lang.Object
-
- com.google.cloud.tools.managedcloudsdk.command.CommandCaller
-
public class CommandCaller extends Object
Execute a command synchronously and save and return stdout.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
call(List<String> command, Path workingDirectory, Map<String,String> environment)
Runs the command and returns process's stdout stream as a string.static CommandCaller
newCaller()
-
-
-
Method Detail
-
call
public String call(List<String> command, @Nullable Path workingDirectory, @Nullable Map<String,String> environment) throws CommandExitException, CommandExecutionException, InterruptedException
Runs the command and returns process's stdout stream as a string.
-
newCaller
public static CommandCaller newCaller()
-
-