diff options
| author | Thad House <thadhouse1@gmail.com> | 2019-05-31 13:49:13 -0700 |
|---|---|---|
| committer | Thad House <thadhouse1@gmail.com> | 2019-05-31 13:49:13 -0700 |
| commit | 788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b (patch) | |
| tree | 173ade0e6960917458afe9dd9fb0c3c2b7f32051 /toolsrc/src/vcpkg.cpp | |
| parent | f483ae4c7fd04eed671a1de595374f84175311e9 (diff) | |
| parent | 26a9338c5055193915290527eacb37f2ac7fdcb8 (diff) | |
| download | vcpkg-788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b.tar.gz vcpkg-788af2a75cfddbb9ef4e4217f4c0b506d25f2f3b.zip | |
Merge master
Diffstat (limited to 'toolsrc/src/vcpkg.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index f8b883e97..9102205d8 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -294,11 +294,11 @@ int main(const int argc, const char* const* const argv) Checks::register_global_shutdown_handler([]() { const auto elapsed_us_inner = GlobalState::timer.lock()->microseconds(); - bool debugging = GlobalState::debugging; + bool debugging = Debug::g_debugging; auto metrics = Metrics::g_metrics.lock(); metrics->track_metric("elapsed_us", elapsed_us_inner); - GlobalState::debugging = false; + Debug::g_debugging = false; metrics->flush(); #if defined(_WIN32) @@ -337,14 +337,13 @@ int main(const int argc, const char* const* const argv) const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); - if (const auto p = args.featurepackages.get()) GlobalState::feature_packages = *p; if (const auto p = args.binarycaching.get()) GlobalState::g_binary_caching = *p; if (const auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); if (const auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); - if (const auto p = args.debug.get()) GlobalState::debugging = *p; + if (const auto p = args.debug.get()) Debug::g_debugging = *p; - if (GlobalState::debugging) + if (Debug::g_debugging) { inner(args); Checks::exit_fail(VCPKG_LINE_INFO); @@ -388,4 +387,7 @@ int main(const int argc, const char* const* const argv) #endif } fflush(stdout); + + //It is expected that one of the sub-commands will exit cleanly before we get here. + Checks::exit_fail(VCPKG_LINE_INFO); } |
