[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Exit status when argument is -version
From: |
Lyndon Nerenberg |
Subject: |
Re: [Nmh-workers] Exit status when argument is -version |
Date: |
Wed, 6 Jun 2012 09:59:12 -0700 |
On 2012-06-06, at 9:39 AM, Ken Hornstein wrote:
> AFAICT ... it's always been that way. We didn't have -version back in
> MH-6.8.5, but at least as far as our sources go back (1999) -version has
> always exited with an exit code of 1.
>
> Should it? I dunno ... what do people think?
The current behaviour is just plain wrong. At the very least it violates the
POLA.
It should return 0 if it succeeds in printing the version. This allows for
things like 'scan -version >/dev/null 2>&1 || echo MH not found' as a quick and
cheap test to see if MH is in the user's $PATH.