From 5c504265f36d04d6a9bd04e049d0ee53639c8b21 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 22 Mar 2017 17:06:09 -0700 Subject: [PATCH] Use Checks::exit_with_message() --- toolsrc/src/vcpkg_cmd_arguments.cpp | 3 +-- toolsrc/src/vcpkg_paths.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg_cmd_arguments.cpp b/toolsrc/src/vcpkg_cmd_arguments.cpp index fdeb6e877a..6ab6e9ee8f 100644 --- a/toolsrc/src/vcpkg_cmd_arguments.cpp +++ b/toolsrc/src/vcpkg_cmd_arguments.cpp @@ -72,9 +72,8 @@ namespace vcpkg if (arg[0] == '-' && arg[1] != '-') { - System::println(System::color::error, "Error: short options are not supported: %s", arg); TrackProperty("error", "error short options are not supported"); - exit(EXIT_FAILURE); + Checks::exit_with_message(VCPKG_LINE_INFO, "Error: short options are not supported: %s", arg); } if (arg[0] == '-' && arg[1] == '-') diff --git a/toolsrc/src/vcpkg_paths.cpp b/toolsrc/src/vcpkg_paths.cpp index f339be47ae..867476e459 100644 --- a/toolsrc/src/vcpkg_paths.cpp +++ b/toolsrc/src/vcpkg_paths.cpp @@ -165,9 +165,8 @@ namespace vcpkg if (paths.root.empty()) { - System::println(System::color::error, "Invalid vcpkg root directory: %s", paths.root.string()); TrackProperty("error", "Invalid vcpkg root directory"); - exit(EXIT_FAILURE); + Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string()); } paths.packages = paths.root / "packages";