From 511149f644224d34ef899321efc114104ef61763 Mon Sep 17 00:00:00 2001 From: itzhang89 <30542109+yutianaiqingtian@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:05:09 +0800 Subject: [PATCH] [fix-10938]: use dot to replace source and make the default env work in shell (#11625) * [fix-10938]: use the dot to replace source and make the default env work in the sh Co-authored-by: Kerwin <37063904+zhuangchong@users.noreply.github.com> --- .../dolphinscheduler/plugin/task/api/ShellCommandExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cd2f0b630e..419b943479 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 @@ -101,7 +101,7 @@ public class ShellCommandExecutor extends AbstractCommandExecutor { } } } else { - sb.append("#!/bin/sh\n"); + sb.append("#!/bin/bash\n"); sb.append("BASEDIR=$(cd `dirname $0`; pwd)\n"); sb.append("cd $BASEDIR\n"); if (!Strings.isNullOrEmpty(taskRequest.getEnvironmentConfig())) {