--sync not allowed for pacsift even without packages on stdin
When pacsift is used with arguments, but inside a bash function - which itself takes stdin from a pipe - it assumes taking packages from stdin as well. As a result, --sync isn't accepted.
Example code: https://ptpb.pw/~aurqueue/sh#L-52
Maybe there's a flaw in my logic, if so, consider this a simple question. :)
That is an unfortunate consequence of having everything read from stdin whenever it's available. I think your current solution using <&- is the correct one, for the time being. I'll try to come up with a better way to control reading from stdin that I can make reasonably consistent across the various tools. In the meantime, I've added caveats to the relevant man pages.
Wouldn't using a - marker for stdin be a simple solution here?
Apparently with pacman 6, the workaround <&- is no longer functional (@kattjevfel)
A mere 7 years later, I'm looking to finally resolve this. I intend to remove the auto-detection and add --read-fd and --read-file options to the relevant programs with - as a shortcut for --read-fd=0.