Still prints to stdout if problem is with PATH
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
command-not-found (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: command-not-found
Bug #129257 fixes the general case of printing error messages to standard output, but the code which deals with an incorrect PATH still prints to standard output.
vnix$ PATH=/sbin:
vnix$ lesspipe
Command 'lesspipe' is available in '/usr/bin/lesspipe'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
bash: lesspipe: command not found
vnix$ lesspipe >/dev/null
bash: lesspipe: command not found
vnix$ lesspipe 2>/dev/null
Command 'lesspipe' is available in '/usr/bin/lesspipe'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
vnix$ /usr/lib/
0.2
vnix$ dpkg -l command-not-found
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii command-not-fo 0.2.8ubuntu2 Suggest installation of packages in interact
vnix$ $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
Here's a quick and somewhat untidy (sorry) patch which attempts to fix the printing of the PATH message to standard error instead of standard output, and also the "kaboom" message in /usr/lib/ command- not-found