未验证 提交 d8cba5ff 编写于 作者: _和's avatar _和 提交者: GitHub

resolve shell task build command nullpointexception (#2267)

Co-authored-by: Nsunchaohe <sunzhaohe@linklogis.com>
上级 efde8fd4
......@@ -134,7 +134,6 @@ public class ShellTask extends AbstractTask {
String script = shellParameters.getRawScript().replaceAll("\\r\\n", "\n");
/**
* combining local and global parameters
*/
......@@ -143,13 +142,9 @@ public class ShellTask extends AbstractTask {
shellParameters.getLocalParametersMap(),
taskProps.getCmdTypeIfComplement(),
taskProps.getScheduleTime());
// if (paramsMap != null){
// script = ParameterUtils.convertParameterPlaceholders(script, ParamUtils.convert(paramsMap));
// }
//new
// replace variable TIME with $[YYYYmmddd...] in shell file when history run job and batch complement job
if (paramsMap != null) {
if(paramsMap != null && taskProps.getScheduleTime()!=null) {
String dateTime = DateUtils.format(taskProps.getScheduleTime(), Constants.PARAMETER_FORMAT_TIME);
Property p = new Property();
p.setValue(dateTime);
......@@ -182,6 +177,4 @@ public class ShellTask extends AbstractTask {
return shellParameters;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册