diff --git a/src/vcpkg.cpp b/src/vcpkg.cpp index fc1c2abc57..2edaba8994 100644 --- a/src/vcpkg.cpp +++ b/src/vcpkg.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -74,7 +75,6 @@ static void invalid_command(const std::string& cmd) static void inner(vcpkg::Filesystem& fs, const VcpkgCmdArguments& args) { - LockGuardPtr(g_metrics)->track_property("command", args.command); if (args.command.empty()) { print_usage(); @@ -98,6 +98,7 @@ static void inner(vcpkg::Filesystem& fs, const VcpkgCmdArguments& args) if (const auto command_function = find_command(Commands::get_available_basic_commands())) { + LockGuardPtr(g_metrics)->track_property("command_name", command_function->name); return command_function->function->perform_and_exit(args, fs); } @@ -108,6 +109,7 @@ static void inner(vcpkg::Filesystem& fs, const VcpkgCmdArguments& args) if (const auto command_function = find_command(Commands::get_available_paths_commands())) { + LockGuardPtr(g_metrics)->track_property("command_name", command_function->name); return command_function->function->perform_and_exit(args, paths); } @@ -118,6 +120,7 @@ static void inner(vcpkg::Filesystem& fs, const VcpkgCmdArguments& args) if (const auto command_function = find_command(Commands::get_available_triplet_commands())) { + LockGuardPtr(g_metrics)->track_property("command_name", command_function->name); return command_function->function->perform_and_exit(args, paths, default_triplet, host_triplet); }