tools: change the error message for missing tools

Given that some people appear to not read until the "is not installed" part of
the error message, let's reduce the error message to just that part. This may
be confusing where a user mistypes the actual command but that happens rarely
compared to those that can't run libinput record because it's in a different
package.

Fixes #500

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-07-01 10:43:16 +10:00
parent f15da0f108
commit a0643a9c98
2 changed files with 2 additions and 3 deletions

View file

@ -561,8 +561,7 @@ tools_exec_command(const char *prefix, int real_argc, char **real_argv)
if (rc) {
if (errno == ENOENT) {
fprintf(stderr,
"libinput: %s is not a libinput command or not installed. "
"See 'libinput --help'\n",
"libinput: %s is not installed.",
command);
return EXIT_INVALID_USAGE;
} else {

View file

@ -105,7 +105,7 @@ class LibinputTool(object):
rc, stdout, stderr = self.run_command(args)
assert rc == 2, (rc, stdout, stderr)
assert stdout.startswith('Usage') or stdout == ''
assert 'is not a libinput command' in stderr
assert 'is not installed' in stderr
class LibinputDebugGui(LibinputTool):