You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~ >> auracle outdated
error: UNKNOWN: Could not resolve host: aur.archlinux.org
~ >> echo $?
1
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: