aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/VcpkgPaths.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/VcpkgPaths.cpp')
-rw-r--r--toolsrc/src/VcpkgPaths.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp
index 4be636650..1b76fdc24 100644
--- a/toolsrc/src/VcpkgPaths.cpp
+++ b/toolsrc/src/VcpkgPaths.cpp
@@ -87,8 +87,11 @@ namespace vcpkg
"(No sufficient installed version was found)",
Strings::to_utf8(tool_name),
version_as_string);
- Metrics::track_property("error", "powershell install failed");
- Metrics::track_property("installcmd", install_cmd);
+ {
+ auto locked_metrics = Metrics::g_metrics.lock();
+ locked_metrics->track_property("error", "powershell install failed");
+ locked_metrics->track_property("installcmd", install_cmd);
+ }
Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code);
}
@@ -186,7 +189,7 @@ namespace vcpkg
if (paths.root.empty())
{
- Metrics::track_property("error", "Invalid vcpkg root directory");
+ Metrics::g_metrics.lock()->track_property("error", "Invalid vcpkg root directory");
Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string());
}