mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
refactor(runner): rename exec vararg parameter to commands for clarity
This commit is contained in:
@@ -27,13 +27,13 @@ public class CommandExecutionService {
|
|||||||
return exec(commands.toArray(new String[0]));
|
return exec(commands.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result exec(String... command) {
|
public Result exec(String... commands) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
List<String> output = new ArrayList<>();
|
List<String> output = new ArrayList<>();
|
||||||
List<String> error = new ArrayList<>();
|
List<String> error = new ArrayList<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Process process = new ProcessBuilder(command)
|
Process process = new ProcessBuilder(commands)
|
||||||
.redirectErrorStream(false)
|
.redirectErrorStream(false)
|
||||||
.start();
|
.start();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user