]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve error message for “ccache -o=K=V”
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 5 Feb 2020 20:31:55 +0000 (21:31 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 5 Feb 2020 20:31:55 +0000 (21:31 +0100)
Previously:

    ccache: error: unknown configuration option ""

Now:

    ccache: error: unknown configuration option "=K"

Related to #529.

src/ccache.cpp

index f9ac1828427f62102dc9459d586b9e60dd1df556..7a1f22712c1a9424de6c0f72ed87ce44b187f3eb 100644 (file)
@@ -3973,7 +3973,7 @@ ccache_main_options(int argc, char* argv[])
 
     case 'o': { // --set-config
       initialize();
-      char* p = strchr(optarg, '=');
+      char* p = strchr(optarg + 1, '='); // Improve error message for -o=K=V
       if (!p) {
         fatal("missing equal sign in \"%s\"", optarg);
       }