yay icon indicating copy to clipboard operation
yay copied to clipboard

Exit code does not match pacman

Open t-richards opened this issue 2 years ago • 0 comments

Affected Version

yay v10.3.1.r58.gb2a7281 - libalpm v13.0.1

Describe the bug

In some cases, the exit code of yay does not match that of pacman. This makes automation difficult because the tools behave in different ways.

Reproduction Steps

  1. Fully update the system.
  2. Query for upgrades using yay.
  3. Query for upgrades using pacman.
  4. Expect the return codes of both invocations to be the same.

Expected behavior

The exit codes provided by yay should match those of pacman.

Output

# pacman -Syyu
:: Synchronizing package databases...
:: Starting full system upgrade...
 there is nothing to do

$ yay -Qu
$ echo $?
0

$ pacman -Qu
$ echo $?
1

t-richards avatar Sep 11 '21 22:09 t-richards