Skip to content

Commit 6a5cee5

Browse files
committed
compatible with script section
1 parent 3cfe9de commit 6a5cee5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tree/src/main/java/com/flowci/tree/yml/StepYml.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class StepYml extends YmlBase<StepNode> {
4949

5050
private String pwsh; // powershell script
5151

52+
private String script; // keep it to compatible old yaml
53+
5254
private String plugin;
5355

5456
private List<String> exports = new LinkedList<>();
@@ -87,6 +89,11 @@ public StepNode toNode(Node parent, int index) {
8789
setSteps(node);
8890
}
8991

92+
// backward compatible, set script to bash
93+
if (StringHelper.hasValue(script) && !StringHelper.hasValue(bash)) {
94+
node.setBash(script);
95+
}
96+
9097
return node;
9198
}
9299

0 commit comments

Comments
 (0)