You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/10/18 04:57:44 UTC
[dolphinscheduler] branch dev updated: [fix] Change the default unix shell executor from sh to bash (#12180)
This is an automated email from the ASF dual-hosted git repository.
zhongjiajie 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 ba538067f2 [fix] Change the default unix shell executor from sh to bash (#12180)
ba538067f2 is described below
commit ba538067f291c4fdb378ca84c02bb31e2fb2d295
Author: simsicon <si...@gmail.com>
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 <37...@users.noreply.github.com>
---
docs/docs/en/guide/upgrade/incompatible.md | 3 ++-
docs/docs/zh/guide/upgrade/incompatible.md | 3 ++-
.../dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java | 1 +
.../apache/dolphinscheduler/plugin/task/api/ShellCommandExecutor.java | 4 ++--
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/docs/docs/en/guide/upgrade/incompatible.md b/docs/docs/en/guide/upgrade/incompatible.md
index 7b20d8fda4..0fd2c409ea 100644
--- a/docs/docs/en/guide/upgrade/incompatible.md
+++ b/docs/docs/en/guide/upgrade/incompatible.md
@@ -5,8 +5,9 @@ This document records the incompatible updates between each version. You need to
## 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)
\ No newline at end of file
+* 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
index 6e97f7d316..0bc0a7e675 100644
--- a/docs/docs/zh/guide/upgrade/incompatible.md
+++ b/docs/docs/zh/guide/upgrade/incompatible.md
@@ -5,8 +5,9 @@
## 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)
\ No newline at end of file
+* 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 f4395566c7..90f1bd3027 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
@@ -131,6 +131,7 @@ public abstract class AbstractCommandExecutor {
command.add("sudo");
command.add("-u");
command.add(taskRequest.getTenantCode());
+ command.add("-E");
}
}
command.add(commandInterpreter());
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 419b943479..9ccc438277 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 com.google.common.base.Strings;
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