tools: change the error message for missing tools
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 1 Jul 2020 00:43:16 +0000 (10:43 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 1 Jul 2020 01:21:21 +0000 (01:21 +0000)
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>
tools/shared.c
tools/test_tool_option_parsing.py

index c8793b3e67844f74589d77f4469cf46c519c0f2a..e0eae6816bc37a424d1a93bc33230ea16bb0fa9d 100644 (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 {
index f506a217625dd461953d092faca31e45323e03e2..d059d914f82299015a10808a1810c7fb753b2a9f 100755 (executable)
@@ -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):