mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
Restore x-upload-metrics command accidentally disabled by removing VCPKG_DISABLE_METRICS (#15810)
* Restore x-upload-metrics command accidentally disabled by removing VCPKG_DISABLE_METRICS in https://github.com/microsoft/vcpkg/pull/15470 * Didn't save a file.
This commit is contained in:
parent
f0997d3f85
commit
925b64efd2
@ -32,9 +32,9 @@ TEST_CASE ("get_available_basic_commands works", "[commands]")
|
||||
check_all_commands(Commands::get_available_basic_commands(), {
|
||||
"contact",
|
||||
"version",
|
||||
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#if defined(_WIN32)
|
||||
"x-upload-metrics",
|
||||
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#endif // defined(_WIN32)
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -41,16 +41,16 @@ namespace vcpkg::Commands
|
||||
{
|
||||
static const Version::VersionCommand version{};
|
||||
static const Contact::ContactCommand contact{};
|
||||
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#if defined(_WIN32)
|
||||
static const UploadMetrics::UploadMetricsCommand upload_metrics{};
|
||||
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
static std::vector<PackageNameAndFunction<const BasicCommand*>> t = {
|
||||
{"version", &version},
|
||||
{"contact", &contact},
|
||||
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#if defined(_WIN32)
|
||||
{"x-upload-metrics", &upload_metrics},
|
||||
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#endif // defined(_WIN32)
|
||||
};
|
||||
return t;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <vcpkg/commands.upload-metrics.h>
|
||||
|
||||
#if VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#if defined(_WIN32)
|
||||
#include <vcpkg/base/checks.h>
|
||||
#include <vcpkg/base/files.h>
|
||||
|
||||
@ -26,4 +26,4 @@ namespace vcpkg::Commands::UploadMetrics
|
||||
Checks::exit_success(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
#endif // VCPKG_ENABLE_X_UPLOAD_METRICS_COMMAND
|
||||
#endif // defined(_WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user