{% if error is defined and error %}
{{ error }}
{% elif result is defined %}
{{ result.command }} {% if result.blocked %} [BLOCKED] {% endif %}
{% if not result.blocked %} exit: {{ result.exit_code }} {% if result.duration_ms %} | {{ result.duration_ms }}ms {% endif %} {% endif %}
{% if result.blocked %}
BLOCKED: {{ result.block_reason }}
{% else %} {% if result.stdout %}
{{ result.stdout }}
{% endif %} {% if result.stderr %}
{{ result.stderr }}
{% endif %} {% if not result.stdout and not result.stderr and result.exit_code == 0 %}
(no output)
{% endif %} {% endif %}
{% endif %}