--update returns wrong exit code #32

Closed
rmarquis opened this Issue Jan 10, 2012 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

rmarquis commented Jan 10, 2012

cower -u does not return expected exit codes. Tested on cower-git:

$ cower -u
:: burp 1.6.7-0 -> 1.6.7-1
$ echo $?
1
$ cower -u doesnotexist
$ echo $?
0

Note: -u when no updates are available might return exit code correctly:

$ cower -u
$ echo $?
0

Exit codes for -d, -s, -i, -m are returned as expected.

Owner

falconindy commented Jan 10, 2012

Unexpected compared to what?

Owner

falconindy commented Jan 10, 2012

The reason I did it this way (and you'll see at the end of main() that I went through great lengths to do this) is because it makes it very easy to throw "cower -u" in a cron job and get output when it "fails".

Contributor

rmarquis commented Jan 11, 2012

Thanks for your explanation, your reasoning makes lot of sens. This isn't a bug, just coder common sens :)

rmarquis closed this Jan 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment