Skip to content

Commit

Permalink
fix: skip optional options if they have no value
Browse files Browse the repository at this point in the history
  • Loading branch information
KernAttila committed Mar 28, 2023
1 parent 0d64869 commit 45c50a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cuesubmit/cuesubmit/Submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ def buildDynamicCmd(layerData):
renderCommand += f' {flag[:-1]}'
continue
value = formatValue(flag, value, isPath, isMandatory)
if isFlag(flag):
if isFlag(flag) and value not in ('', None):
# flag and value
renderCommand += f' {flag} {value}'
continue
# solo argument without flag
renderCommand += f' {value}'
if value not in ('', None):
renderCommand += f' {value}'

return renderCommand

Expand Down

0 comments on commit 45c50a1

Please sign in to comment.