Browse Source

[Fix-4455][common] fix parse shell output (#4456)

guohaozhang 4 years ago
parent
commit
fb5501f590

+ 1 - 1
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java

@@ -140,8 +140,8 @@ public class ShellExecutor extends AbstractShell {
         String line = "";
         while ( (nRead = lines.read(buf, 0, buf.length)) > 0 ) {
             line = new String(buf,0,nRead);
+            output.append(line);
         }
-        output.append(line);
     }
 
     /**