File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
platform-plugin/src/main/java/com/flow/platform/plugin/util Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments