From 93f8088a5a48998f3ddc25781c4bdf566a73f24b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Sep 2016 11:50:31 -0700 Subject: [vcpkg] Improved help message upon build failure. --- toolsrc/src/commands_installation.cpp | 11 +++++++++-- toolsrc/src/commands_update.cpp | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 24ea7480b..e94791efa 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -37,9 +37,16 @@ namespace vcpkg if (return_code != 0) { - System::println(System::color::error, "Error: build command failed"); + System::println(System::color::error, "Error: building package %s failed", to_string(spec)); + System::println("Please ensure sure you're using the latest portfiles with `vcpkg update`, then\n" + "submit an issue at https://github.com/Microsoft/vcpkg/issues including:\n" + " Package: %s\n" + " Vcpkg version: %s\n" + "\n" + "Additionally, attach any relevant sections from the log files above." + , to_string(spec), version()); TrackProperty("error", "build failed"); - TrackProperty("build_error", std::to_string(return_code)); + TrackProperty("build_error", to_string(spec)); exit(EXIT_FAILURE); } diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index eec3e46a7..3cd7af027 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -7,6 +7,8 @@ namespace vcpkg { void update_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& paths) { + System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); + auto status_db = database_load_check(paths); std::unordered_map src_names_to_versions; -- cgit v1.2.3