Skip to content

Commit 9a08dda

Browse files
committed
add annotation
1 parent 84c1d38 commit 9a08dda

File tree

1 file changed

+9
-1
lines changed
  • platform-plugin/src/main/java/com/flow/platform/plugin/util

1 file changed

+9
-1
lines changed

platform-plugin/src/main/java/com/flow/platform/plugin/util/CmdUtil.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,25 @@ public static void exeCmd(String shell) {
3535
Process process;
3636
ProcessBuilder pb = new ProcessBuilder(Unix.CMD_EXECUTOR, "-c", shell);
3737
pb.environment();
38-
pb.redirectErrorStream(true); // merge error stream into standard stream
38+
39+
// Merge error stream to standard stream
40+
pb.redirectErrorStream(true);
41+
42+
// start
3943
process = pb.start();
4044
if (process != null) {
4145
br = new BufferedReader(
4246
new InputStreamReader(process.getInputStream()), 1024);
47+
48+
// wait process finish
4349
process.waitFor();
4450
} else {
4551
throw new PluginException("Plugin running process is not start");
4652
}
53+
4754
String line;
4855
while (br != null && (line = br.readLine()) != null) {
56+
// show running log
4957
LOGGER.debug(line);
5058
}
5159
} catch (Exception e) {

0 commit comments

Comments
 (0)