Skip to content

Commit

Permalink
FIX: handle boolean flags correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
misialq committed Nov 18, 2024
1 parent ad5eff4 commit 9397f36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion q2_fastp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def run_command(cmd, env=None, verbose=True, pipe=False, **kwargs):


def add_param(cmd, param, value, flag=None):
if value is not None and value != "":
if isinstance(value, bool):
if value:
cmd.append(flag if flag else f"--{param}")
elif value is not None and value != "":
cmd.append(flag if flag else f"--{param}")
cmd.append(str(value))

0 comments on commit 9397f36

Please sign in to comment.