]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Strip .exe from executable name on version output (#1135)
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Thu, 18 Aug 2022 17:19:39 +0000 (20:19 +0300)
committerGitHub <noreply@github.com>
Thu, 18 Aug 2022 17:19:39 +0000 (19:19 +0200)
src/core/mainoptions.cpp

index 936689c848e9ff3468bb532da56da3f984418c93..cff3f884834ef5c6f2f59d7149535d93b7f8f291 100644 (file)
@@ -586,8 +586,14 @@ process_main_options(int argc, const char* const* argv)
       break;
 
     case 'V': // --version
-      PRINT_RAW(stdout, get_version_text(Util::base_name(argv[0])));
+    {
+      std::string_view name = Util::base_name(argv[0]);
+#ifdef _WIN32
+      name = Util::remove_extension(name);
+#endif
+      PRINT_RAW(stdout, get_version_text(name));
       break;
+    }
 
     case 'x': // --show-compression
     {