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

zhongjiajie pushed a commit to branch 3.0.3-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git

commit 9f1457171374539b636439fc6d5d8f77d8882b91
Author: simsicon <[email protected]>
AuthorDate: Tue Oct 18 12:57:37 2022 +0800

    [fix] Change the default unix shell executor from sh to bash (#12180)
    
    Co-authored-by: Kerwin <[email protected]>
    
    (cherry picked from commit ba538067f291c4fdb378ca84c02bb31e2fb2d295)
---
 docs/docs/en/guide/upgrade/incompatible.md                  | 13 +++++++++++++
 docs/docs/zh/guide/upgrade/incompatible.md                  | 13 +++++++++++++
 .../plugin/task/api/AbstractCommandExecutor.java            |  9 +++++----
 .../plugin/task/api/ShellCommandExecutor.java               |  4 ++--
 4 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/docs/docs/en/guide/upgrade/incompatible.md 
b/docs/docs/en/guide/upgrade/incompatible.md
new file mode 100644
index 0000000000..0fd2c409ea
--- /dev/null
+++ b/docs/docs/en/guide/upgrade/incompatible.md
@@ -0,0 +1,13 @@
+# Incompatible
+
+This document records the incompatible updates between each version. You need 
to check this document before you upgrade to related version.
+
+## dev
+
+* Remove the spark version of spark task 
([#11860](https://github.com/apache/dolphinscheduler/pull/11860)).
+* Change the default unix shell executor from sh to bash 
([#12180](https://github.com/apache/dolphinscheduler/pull/12180)).
+
+## 3.0.0
+
+* Copy and import workflow without 'copy' suffix 
[#10607](https://github.com/apache/dolphinscheduler/pull/10607)
+* Use semicolon as default sql segment separator 
[#10869](https://github.com/apache/dolphinscheduler/pull/10869)
diff --git a/docs/docs/zh/guide/upgrade/incompatible.md 
b/docs/docs/zh/guide/upgrade/incompatible.md
new file mode 100644
index 0000000000..0bc0a7e675
--- /dev/null
+++ b/docs/docs/zh/guide/upgrade/incompatible.md
@@ -0,0 +1,13 @@
+# 不向前兼容的更新
+
+本文档记录了各版本之间不兼容的更新内容。在升级到相关版本前,请检查本文档。
+
+## dev
+
+* Remove the spark version of spark task 
([#11860](https://github.com/apache/dolphinscheduler/pull/11860)).
+* Change the default unix shell executor from sh to bash 
([#12180](https://github.com/apache/dolphinscheduler/pull/12180)).
+
+## 3.0.0
+
+* Copy and import workflow without 'copy' suffix 
[#10607](https://github.com/apache/dolphinscheduler/pull/10607)
+* Use semicolon as default sql segment separator 
[#10869](https://github.com/apache/dolphinscheduler/pull/10869)
diff --git 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
index 5faa07bba8..08cb1bda30 100644
--- 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
+++ 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
@@ -122,9 +122,10 @@ public abstract class AbstractCommandExecutor {
 
         // if sudo.enable=true,setting up user to run commands
         if (OSUtils.isSudoEnable()) {
-            command.add("sudo");
-            command.add("-u");
-            command.add(taskRequest.getTenantCode());
+                command.add("sudo");
+                command.add("-u");
+                command.add(taskRequest.getTenantCode());
+                command.add("-E");
         }
         command.add(commandInterpreter());
         command.addAll(Collections.emptyList());
@@ -398,7 +399,7 @@ public abstract class AbstractCommandExecutor {
 
         return lineList;
     }
-    
+
     /**
      * find var pool
      *
diff --git 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/ShellCommandExecutor.java
 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/ShellCommandExecutor.java
index 09eeb53f3a..5761c29606 100644
--- 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/ShellCommandExecutor.java
+++ 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/ShellCommandExecutor.java
@@ -38,9 +38,9 @@ import org.slf4j.Logger;
 public class ShellCommandExecutor extends AbstractCommandExecutor {
 
     /**
-     * For Unix-like, using sh
+     * For Unix-like, using bash
      */
-    private static final String SH = "sh";
+    private static final String SH = "bash";
 
     /**
      * For Windows, using cmd.exe

Reply via email to