From 54d73a56f8c3cdc5a2646a365a12f0ead961bb41 Mon Sep 17 00:00:00 2001 From: ras0219 <533828+ras0219@users.noreply.github.com> Date: Mon, 14 Dec 2020 12:02:22 -0800 Subject: [vcpkg] Disable survey message (#14954) --- toolsrc/src/vcpkg.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index bfdc6ac4f..f128210fd 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -84,28 +84,6 @@ static void inner(vcpkg::Files::Filesystem& fs, const VcpkgCmdArguments& args) !args.output_json()) { Commands::Version::warn_if_vcpkg_version_mismatch(paths); - std::string surveydate = *GlobalState::g_surveydate.lock(); - auto maybe_surveydate = Chrono::CTime::parse(surveydate); - if (auto p_surveydate = maybe_surveydate.get()) - { - const auto now = Chrono::CTime::get_current_date_time().value_or_exit(VCPKG_LINE_INFO); - const auto delta = now.to_time_point() - p_surveydate->to_time_point(); - if (std::chrono::duration_cast(delta).count() > SURVEY_INTERVAL_IN_HOURS) - { - std::default_random_engine generator( - static_cast(now.to_time_point().time_since_epoch().count())); - std::uniform_int_distribution distribution(1, 4); - - if (distribution(generator) == 1) - { - Metrics::g_metrics.lock()->track_property("surveyprompt", "true"); - System::print2( - System::Color::success, - "Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey " - "by running: vcpkg contact --survey\n"); - } - } - } } if (const auto command_function = find_command(Commands::get_available_paths_commands())) -- cgit v1.2.3