Bug 241906 - `locale -k` with an invalid keyword exits with 0
Summary: `locale -k` with an invalid keyword exits with 0
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-12 05:37 UTC by AJ Jordan
Modified: 2019-11-14 21:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AJ Jordan 2019-11-12 05:37:45 UTC
If I run, for example, `locale -k nonexistant`, I get a helpful error message: `Unknown keyword: 'nonexistant'`.

However, `locale` in this case still exits with an exit code of 0. It should probably exit with nonzero instead to indicate the failure in finding the keyword.
Comment 1 AJ Jordan 2019-11-12 15:22:49 UTC
An identical bug also exists in NetBSD. See https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54692