Quoting optional variable

Using Cromwell 36 with WDL 1.0 spec, I'm trying to do this optional string variable interpolation in the command of one of my task WDLs:
${"--name '" + dataset_name + "'"}
I was hoping this would translate to (for example):
--name 'My Dataset'
And that is what happens when this variable is defined. However when the variable is undefined, I end up with a lone single quote, which causes the execution script to crash and the task hangs indefinitely in Cromwell. This looks awfully like a bug in the variable interpolation, but is it possible I'm just doing it wrong?

(Sorry this is out of context, if you need a runnable example I'll cook one up, but I'm hoping there's an easy answer.)

Sign In or Register to comment.