Closed karabaja4 closed 3 years ago
IMO, it's perfectly fine that it's ambiguous. There's absolute consistency in a non-zero exit status indicating that no upgradable packages were able to be found, regardless of the reason. A zero exit status indicates with certainty that packages are available. This is a nice feature.
You should never need to query the AUR for upgrades such that you: a) have complex logic to retry failures based on an exit status, b) can't wait for the external condition to resolve itself some minutes/hours/days later. I do not want to commit to exit statuses as API.
Hello,
auracle has exit code 1 in both these situations:
No updates available:
Internet connection down:
This makes it hard to call auracle from scripts because it's impossible to differentiate between success/failure of fetching the number of upgradable packages without parsing stderr.
I would expect auracle to return 0 (success) if the connection to AUR is successfully established and no packages are upgradable, or return some error code other than 1 if there was a connection issue to differentiate this from a "no updates available" exit code.
Regards,
Igor