nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.39k stars 56 forks source link

Commands flags with quoted parameters lose flags. #177

Closed joshriverscambia2019 closed 9 months ago

joshriverscambia2019 commented 10 months ago

When you define a command task with a flag parameter with an equals sign and a quoted operand, the flag is omitted from the command execution.

For example, the task:

foo = "ls --color='always'"

Will output:

% poetry run poe foo
Poe => ls always
ls: always: No such file or directory

While one would expect:

% poetry run poe foo
Poe => ls --color=always
README.md      pyproject.toml

This problem began with v0.23.0. It seems likely that the issue is that the resolve_command_tokens function is losing data in token_parts variable when it is re-initialized within this loop.

nat-n commented 10 months ago

Hi @joshriverscambia2019

Thanks for the feedback :) yep that's a bug in the new cmd parsing logic! I'll get a fix for that out soon :)

nat-n commented 9 months ago

Thanks again for reporting this bug. It's now fixed with v0.24.2 🚀