Nukesor/pueue

[Bug] CLI parsing error when adding a task with a priority using `-o` or `--priority`

wjv opened this issue · 3 comments

wjv commented

Describe the bug

When adding a prioritised task with pueue add -o INT "<task>", the CLI parser somehow sees the quoted task as a priority integer. Both the short flag (-o) and the long flag (--priority) are affected.

Steps to reproduce

  1. I attempt to add ad a task with pueue add -o 10 "sleep 60"
  2. pueue exits with error code 2, and the following error message:
error: invalid value 'sleep 60' for '--priority <PRIORITY>...': invalid digit found in string

Debug logs (if relevant)

No response

Operating system

macOS 14.2.1

Pueue version

v3.3.2

Additional context

No response

wjv commented

I should add that…

pueue add -o 10 -- "sleep 60"

does work as expected. So that's a trivial workaround. :)

I did a copy-paste bug and forced list parsing on priority -.-

I'll push a point release with a fix for this soonish.

For the time being, you can also use -o=10

v3.3.3 is released :)