From 2e3274a5a47819ca651bc183bad8443a5c79d3c7 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 22 Apr 2023 10:05:37 -0400 Subject: Fix argument handling for command --- poetry_plugin_taskipy/commands.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'poetry_plugin_taskipy/commands.py') diff --git a/poetry_plugin_taskipy/commands.py b/poetry_plugin_taskipy/commands.py index 40381e9..4e80fd8 100644 --- a/poetry_plugin_taskipy/commands.py +++ b/poetry_plugin_taskipy/commands.py @@ -19,12 +19,15 @@ class TaskipyCommand(Command): ] def handle(self) -> int: - args = [] + arguments = [] if self.argument("name"): - args.append(self.argument("name")) + arguments.append(self.argument("name")) if self.argument("args"): - args.extend(self.argument("args")) + arguments.extend(self.argument("args")) - return taskipy.run(args) + if self.option("list"): + arguments.append("--list") + + return taskipy.run(arguments) -- cgit v1.2.3