Skip to content

Commit 5eda8c1

Browse files
committed
Fix previous commit
1 parent a7d9411 commit 5eda8c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wdlgen/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def get_string(self):
167167

168168
stroptions = "".join(o + " " for o in options)
169169

170-
if self.optional and not default and not is_flag:
171-
prewithquotes = f'"{bc}" + ' if bc.strip() else ""
170+
prewithquotes = f'"{bc}" + ' if bc.strip() else ""
171+
if self.optional and not default and not is_flag and prewithquotes:
172172
# Option 1: We apply quotes are value, Option 2: We quote whole "prefix + name" combo
173173
full_token = (
174174
f"{prewithquotes} '\"' + {name} + '\"'"

0 commit comments

Comments
 (0)