Browse Source

[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>
3.2.0-release
itzhang89 2 years ago committed by GitHub
parent
commit
511149f644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/ShellCommandExecutor.java

2
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())) {

Loading…
Cancel
Save