Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wjv opened this issue Jan 2, 2024 · 3 comments · Fixed by #487
Closed

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

wjv opened this issue Jan 2, 2024 · 3 comments · Fixed by #487

Comments

@wjv
Copy link

wjv commented Jan 2, 2024

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
Copy link
Author

wjv commented Jan 2, 2024

I should add that…

pueue add -o 10 -- "sleep 60"

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

@Nukesor
Copy link
Owner

Nukesor commented Jan 2, 2024

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

@Nukesor
Copy link
Owner

Nukesor commented Jan 4, 2024

v3.3.3 is released :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants