Improve pueue follow
behaviour with a task that does not yet have logs
#436
Labels
t: Feature
A new feature that needs implementation
A detailed description of the feature you would like to see added.
pueue follow ${TASK_ID}
to exit with code != 0 when it cannot find a task log with that ID.These are the lines that would need to be changed:
pueue/pueue/src/client/display/follow.rs
Lines 30 to 33 in facfb2b
Ideally, these would also be implemented, but if change 1 above was done, these could be implemented in a wrapper script:
${TASK_ID}
is currently queued (but not yet running),follow
would wait for${TASK_ID}
to start and then follow the logs as normal. (This behaviour could be optional)--follow
topueue add
that automatically runspueue follow ${TASK_ID}
after the task is added.Currently if the task log is not present,
pueue follow
will print a human-readable error message, but exit with code 0 (success).Explain your usecase of the requested feature
I am adding a task from a script, and I want to follow the log output for that task.
Alternatives
As a workaround, my wrapper script would have to:
pueue add
the taskpueue wait --status Running ${TASK_ID}
pueue follow ${TASK_ID}
Additional context
If you like the sound of these features, I can implement them and submit a PR. Let me know :)
The text was updated successfully, but these errors were encountered: