command-not-found crashes when my locale is invalid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
command-not-found |
New
|
Undecided
|
Unassigned | ||
command-not-found (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I've these locale vars in my environment:
$ env|grep ^LC_\\\|^LANG
LC_
LC_
LANG=
LC_
When I ssh into a new Ubuntu 12.04 server install, that locale doesn't exist:
$ locale charmap
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
ANSI_X3.4-1968
I was trying to generate it and misspelled the command name, when suddenly command-not-found crashed:
# localegen lt_LT.UTF-8
Sorry, command-not-found has crashed! Please file a bug report at:
https:/
Please include the following information with the report:
command-
After I generated the locale, I was no longer able to reproduce the crash:
# locale-gen lt_LT.UTF-8
Generating locales...
lt_
Generation complete.
# localegen lt_LT.UTF-8
No command 'localegen' found, did you mean:
Command 'locale-gen' from package 'locales' (main)
localegen: command not found
Status changed to 'Confirmed' because the bug affects multiple users.