-
Notifications
You must be signed in to change notification settings - Fork 134
Common Pitfalls and Debugging
Try to run the command without adding it to Pueue.
Do this by calling sh -c '$COMMAND'
instead of pueue add '$COMMAND'
.
If this fails, it's not a problem with Pueue, but the command or the shell's features itself.
Some examples of what can go wrong:
- A single
&
somewhere in your command detaches the process, causing the Pueue task to finish immediately. - The system shell in Ubuntu 18.04, doesn't support the
&>
parameter, which is interpreted as&
and detaches processes. Use2>&1
instead.
Look at the process output:
This can be done via pueue log $task_id
.
You can also get a live view of the output with pueue follow $task_id
.
Add the -e
flag, if you want to see the error output.
Pueue takes your input and uses it exactly as is to create a new sh -c $command
in the background.
If your command contains spaces or characters that need escaping, you might need to encapsulate it as a string:
pueue add -- ls -al "/tmp/this\ is\ a\ test\ directory"
Without quotes, the character escaping won't be transferred to the sh -c $command
, as it's already removed by calling it from the current shell.
Sometimes processes may wait for user input.
For instance, most package manager wait for some kind of confirmation (y/n
).
If this is the case, you can simply send the desired input to the process via the send
subcommand:
pueue send "y
"
However, this can often be avoided by adding something like a --yes
flag to the command with.
Given that the called command provides this flag.
Pueue doesn't support aliases in your shell's .*rc
files, since that's pretty tricky.
That's why Pueue brings it's own aliasing.
Check the miscellaneous section on how to use it.
All programs that require some kind of display/window manager won't work, as the tasks are executed in the background.
Don't use Pueue for commands that won't work in a non-visual environment.