File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ def scanner(scan):
104
104
return None
105
105
106
106
def interpolate (scan , jslib ):
107
+ scan = scan .strip ()
107
108
parts = []
108
109
w = scanner (scan )
109
110
while w :
Original file line number Diff line number Diff line change @@ -110,28 +110,29 @@ def _draftDraft3dev1toDev2(doc):
110
110
doc [a ] = "$(inputs[%s])" % '][' .join (sp )
111
111
else :
112
112
sc = updateScript (ent ["script" ])
113
- if sc == "{" :
113
+ if sc [ 0 ] == "{" :
114
114
doc [a ] = "$" + sc
115
115
else :
116
116
doc [a ] = "$(%s)" % sc
117
117
else :
118
118
doc [a ] = _draftDraft3dev1toDev2 (doc [a ])
119
119
120
- if "class" in doc and (doc ["class" ] == "CommandLineTool" or doc [ "class" ] == "Workflow" ):
121
- found = False
120
+ if "class" in doc and (doc ["class" ] in ( "CommandLineTool" , "Workflow" , "ExpressionTool" ) ):
121
+ added = False
122
122
if "requirements" in doc :
123
123
for r in doc ["requirements" ]:
124
- if r ["class" ] == "ExpressionEngineRequirement" and "engineConfig" in r :
125
- doc ["requirements" ].append ({
126
- "class" :"InlineJavascriptRequirement" ,
127
- "expressionLib" : [updateScript (sc ) for sc in aslist (r ["engineConfig" ])]
128
- })
124
+ if r ["class" ] == "ExpressionEngineRequirement" :
125
+ if "engineConfig" in r :
126
+ doc ["requirements" ].append ({
127
+ "class" :"InlineJavascriptRequirement" ,
128
+ "expressionLib" : [updateScript (sc ) for sc in aslist (r ["engineConfig" ])]
129
+ })
130
+ added = True
129
131
doc ["requirements" ] = [rq for rq in doc ["requirements" ] if rq ["class" ] != "ExpressionEngineRequirement" ]
130
- found = True
131
132
break
132
133
else :
133
134
doc ["requirements" ] = []
134
- if not found :
135
+ if not added :
135
136
doc ["requirements" ].append ({"class" :"InlineJavascriptRequirement" })
136
137
137
138
elif isinstance (doc , list ):
You can’t perform that action at this time.
0 commit comments