Spyhawk/pacaur — Issue #60: fix exit error code for -k, --check
Author: Spyhawk
Created: 2012-01-12 14:00:51+00:00
State: open
Labels: bug

cower -u exit code are a bit unconventional: it return 1 when updates are available, else 0. This is intended to be used in a cron job.

cower.c main()

```
/* we need to exit with a non-zero value when:
* a) search/info/download returns nothing
* b) update (without download) returns something
* this is opposing behavior, so just XOR the result on a pure update */
```

Check if it make sense to return "correct" exit code when using cower through pacaur. If default exit codes were to be overridden, it could be done probably without complicating too much the code:
return 0 in any case (update available or not), but check package name validity prior to "pacaur -k ". If package name is valid, return 0, else 1. If cower/pacaur can't connect to server, exit error code 1 would be returned anyway

Exit error code for -s, -i have been fixed in cfee5b66e5493c3302f739f4701e5c14b636a786.