Open azat-badretdin opened 5 years ago
I believe the bug is in checking whether entry
is present: in Python, an empty string is False, so the following check explicitly prevents files with empty content. I think empty files should be allowed, and if you need a check, it should be for presence of a value, i.e. not None
:
--- command_line_tool.py
+++ FIXED_command_line_tool.py
@@ -436,7 +436,7 @@
else:
et["entryname"] = None
et["writable"] = t.get("writable", False)
- if et[u"entry"]:
+ if et[u"entry"] is not None:
ls.append(et)
else:
initwd_item = builder.do_eval(t)
Note that the check for evalutates-to-false entry
was added as part of issue #879, apparently to handle null
values. An empty string is not a null value, so I think my recommended fix doesn't conflict with the intent of the additional check.
Expected Behavior
empty listing.entryname file is expected to be created when inputs.annotation is NULL
Actual Behavior
empty listing.entryname file is not created
Workflow Code
Full Traceback
Your Environment