Skip to content

Commit bcfa49f

Browse files
committed
pack.py: add 'cwlVersion' in pack dict, if only single item exists
1 parent da4930f commit bcfa49f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cwltool/pack.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,9 @@ def rewrite_id(r, mainuri):
157157

158158
import_embed(packed, set())
159159

160+
if len(packed["$graph"]) == 1:
161+
# duplicate 'cwlVersion' inside $graph when there is a single item
162+
# because we're printing contents inside '$graph' rather than whole dict
163+
packed["$graph"][0]["cwlVersion"] = packed["cwlVersion"]
164+
160165
return packed

0 commit comments

Comments
 (0)