xbps icon indicating copy to clipboard operation
xbps copied to clipboard

Document and stabilize exit status

Open Duncaen opened this issue 2 years ago • 1 comments

Currently xbps uses errnos as exit status, the actual error numbers are not actually defined by a standard so it would be good to switch those out for pre defined and documented numbers ("EXIT STATUS" sections in man pages).

When defining those numbers, we should keep them somewhat compatible with the current ones, especially for xbps-install and xbps-query as xbps-src and probably other scripts use those numbers.

Duncaen avatar Dec 30 '21 13:12 Duncaen

We should also take this opportunity to add some exit statuses where 0 is returned currently, e.g. xbps-query -s fasdasd should not return 0. (Same for -x, -X. Returning 2 would be consistent with -f and the default behavior.)

leahneukirchen avatar Dec 30 '21 13:12 leahneukirchen