Skip to content

Commit

Permalink
miniwdl cromwell: accept Boolean inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Mar 27, 2019
1 parent 28f32e6 commit 47979c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WDL/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,12 @@ def cromwell_input_value(s_value, ty):
if not os.path.exists(s_value):
die("File not found: " + s_value)
return WDL.Value.String(os.path.abspath(s_value))
if isinstance(ty, WDL.Type.Boolean):
if s_value == "true":
return WDL.Value.Boolean(True)
if s_value == "false":
return WDL.Value.Boolean(False)
die("Boolean input should be true or false instead of {}".format(s_value))
if isinstance(ty, WDL.Type.Int):
return WDL.Value.Int(int(s_value))
if isinstance(ty, WDL.Type.Float):
Expand Down

0 comments on commit 47979c3

Please sign in to comment.