Affected Version
yay v11.1.2 - libalpm v13.0.1
Describe the bug
When --print-format is passed to yay when installing a package, yay will synchronize package databases before exiting with a 'target not found' error

Reproduction Steps
- Find a AUR package (I selected scc)
- Invoke yay with the package (eg,
yay --print-format "%n %v" -Syu scc
Expected behavior
yay should ignore the --print-format argument and install the packages as necessary. It doesn't actually have to process it, or apply it, just ignore it (and whatever operand is provided to it)
The reason this is relevant is because the ansible pacman module always passes --print-format by default, and as far as I can tell, there's no way to disable this.
Output
{
"aururl": "https://aur.archlinux.org",
"buildDir": "/home/alecto/.cache/yay",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"rebuild": "no",
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"searchby": "name-desc",
"gitflags": "",
"removemake": "ask",
"sudobin": "sudo",
"sudoflags": "",
"requestsplitn": 150,
"completionrefreshtime": 7,
"bottomup": true,
"sudoloop": false,
"timeupdate": false,
"devel": false,
"cleanAfter": false,
"provides": true,
"pgpfetch": true,
"upgrademenu": true,
"cleanmenu": true,
"diffmenu": true,
"editmenu": false,
"combinedupgrade": false,
"useask": false,
"batchinstall": false,
"singlelineresults": false,
"version": "11.1.2"
}
Affected Version
Describe the bug
When

--print-formatis passed to yay when installing a package, yay will synchronize package databases before exiting with a 'target not found' errorReproduction Steps
yay --print-format "%n %v" -Syu sccExpected behavior
yay should ignore the
--print-formatargument and install the packages as necessary. It doesn't actually have to process it, or apply it, just ignore it (and whatever operand is provided to it)The reason this is relevant is because the ansible pacman module always passes
--print-formatby default, and as far as I can tell, there's no way to disable this.Output
{ "aururl": "https://aur.archlinux.org", "buildDir": "/home/alecto/.cache/yay", "editor": "", "editorflags": "", "makepkgbin": "makepkg", "makepkgconf": "", "pacmanbin": "pacman", "pacmanconf": "/etc/pacman.conf", "redownload": "no", "rebuild": "no", "answerclean": "", "answerdiff": "", "answeredit": "", "answerupgrade": "", "gitbin": "git", "gpgbin": "gpg", "gpgflags": "", "mflags": "", "sortby": "votes", "searchby": "name-desc", "gitflags": "", "removemake": "ask", "sudobin": "sudo", "sudoflags": "", "requestsplitn": 150, "completionrefreshtime": 7, "bottomup": true, "sudoloop": false, "timeupdate": false, "devel": false, "cleanAfter": false, "provides": true, "pgpfetch": true, "upgrademenu": true, "cleanmenu": true, "diffmenu": true, "editmenu": false, "combinedupgrade": false, "useask": false, "batchinstall": false, "singlelineresults": false, "version": "11.1.2" }