Optional Flags With No Parameters

Suppose I have the following task:

task dog {

String dogName
Boolean ? doesBark
command {
dogs.py -name ${dogName}

What I want to do is if the user sets doesBark to true, than a flag, -doesBark should be added so the command looks like this:

dogs.py -name fido -doesBark

but if doesBark is false, you'd just get:

dogs.py -name fido

How would you accomplish this in a WDL?



Best Answer


  • Thank you. I didn't realize you could if-then-else inside a task block.

Sign In or Register to comment.