This is an automated email from the ASF dual-hosted git repository.

lidongdai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new fb5501f  [Fix-4455][common] fix parse shell output (#4456)
fb5501f is described below

commit fb5501f590713857cd28550cc63f966b2080ef2e
Author: guohaozhang <[email protected]>
AuthorDate: Thu Jan 14 18:41:34 2021 +0800

    [Fix-4455][common] fix parse shell output (#4456)
---
 .../java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java
 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java
index 7267447..8d2b768 100644
--- 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/shell/ShellExecutor.java
+++ 
b/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);
     }
 
     /**

Reply via email to