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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 82ff24ae99 [Fix-16295][Task] Remote Shell Task plugin run error 
(#16296)
82ff24ae99 is described below

commit 82ff24ae99fa9a63bff6b1c9d283f72e848f90f8
Author: wangbowen <[email protected]>
AuthorDate: Wed Jul 10 20:02:12 2024 +0800

    [Fix-16295][Task] Remote Shell Task plugin run error (#16296)
---
 .../apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java
 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java
index 814826a6bb..907d496d3d 100644
--- 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java
+++ 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java
@@ -131,7 +131,7 @@ public class RemoteExecutor implements AutoCloseable {
         int exitCode = -1;
         log.info("Remote shell task run status: {}", logLine);
         if (logLine.contains(STATUS_TAG_MESSAGE)) {
-            String status = StringUtils.substringAfter(logLine, 
STATUS_TAG_MESSAGE);
+            String status = StringUtils.substringAfter(logLine, 
STATUS_TAG_MESSAGE).trim();
             if (status.equals("0")) {
                 log.info("Remote shell task success");
                 exitCode = 0;

Reply via email to