fix(args): allow boolean arguments

This commit is contained in:
Alexander Weidinger 2019-10-04 02:26:36 +02:00 committed by alxwr
parent a4fd589592
commit 39dacf09a0

View File

@ -35,7 +35,13 @@
{%- if args|length > 0 %} {%- if args|length > 0 %}
{%- for k,v in args -%} {%- for k,v in args -%}
{%- if not k or not v %}{% continue %}{% endif -%} {%- if not k or not v %}{% continue %}{% endif -%}
{%- if v == True -%}
--{{ k }}
{%- elif v == False -%}
--no-{{ k }}
{%- else -%}
--{{ k }}={{ v }} --{{ k }}={{ v }}
{%- endif -%}
{%- if not loop.last %} {% endif -%} {%- if not loop.last %} {% endif -%}
{%- endfor -%} {%- endfor -%}
{%- endif -%} {%- endif -%}