Skip to content

Exit code is 0 when AUR package not found #2346

@clsty

Description

@clsty

Affected Version

yay v12.2.0 - libalpm v13.0.2

Describe the bug

See issue title and Reproduction Steps.
While #430 said it's already fixed, but according to my test it seems not now.

More background info, but not important for solving this issue: end-4/dots-hyprland#204

Reproduction Steps

E.g. hyprshade is an AUR package, while hyprshades is not.

yay --noconfirm -S hyprshades; echo "Exit code=$?":

 -> No AUR package found for hyprshades
 there is nothing to do
Exit code=0

paru --noconfirm -S hyprshades; echo "Exit code=$?":

:: Resolving dependencies...
error: could not find all required packages:
    hyprshades (target)
Exit code=1

Expected behavior

Exit code is 1 when package not found.

Output

Click to expand.
{
	"aururl": "https://aur.archlinux.org",
	"aurrpcurl": "https://aur.archlinux.org/rpc?",
	"buildDir": "/home/myself/.cache/yay",
	"editor": "",
	"editorflags": "",
	"makepkgbin": "makepkg",
	"makepkgconf": "",
	"pacmanbin": "pacman",
	"pacmanconf": "/etc/pacman.conf",
	"redownload": "no",
	"answerclean": "",
	"answerdiff": "",
	"answeredit": "",
	"answerupgrade": "",
	"gitbin": "git",
	"gpgbin": "gpg",
	"gpgflags": "",
	"mflags": "",
	"sortby": "votes",
	"searchby": "name-desc",
	"gitflags": "",
	"removemake": "ask",
	"sudobin": "sudo",
	"sudoflags": "",
	"version": "12.2.0",
	"requestsplitn": 150,
	"completionrefreshtime": 7,
	"maxconcurrentdownloads": 1,
	"bottomup": true,
	"sudoloop": false,
	"timeupdate": false,
	"devel": false,
	"cleanAfter": false,
	"keepSrc": false,
	"provides": true,
	"pgpfetch": true,
	"cleanmenu": true,
	"diffmenu": true,
	"editmenu": false,
	"combinedupgrade": true,
	"useask": false,
	"batchinstall": false,
	"singlelineresults": false,
	"separatesources": true,
	"debug": false,
	"rpc": true,
	"doubleconfirm": true,
	"rebuild": "no"
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions