diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-30 16:54:07 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-30 16:54:07 -0700 |
| commit | 4b0f3d87befb84c819afbf664614281491a784b9 (patch) | |
| tree | e36c167739be60fec7f4704939936506bc1de86e /toolsrc/src/vcpkg_Input.cpp | |
| parent | d31498d0e7c22251b22594763d91c9f36a32629a (diff) | |
| download | vcpkg-4b0f3d87befb84c819afbf664614281491a784b9.tar.gz vcpkg-4b0f3d87befb84c819afbf664614281491a784b9.zip | |
Introduce Input::check_triplet()
Diffstat (limited to 'toolsrc/src/vcpkg_Input.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg_Input.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index de5890da1..09fce7b8c 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -1,5 +1,7 @@ #include "vcpkg_Input.h" #include "vcpkg_System.h" +#include "metrics.h" +#include "vcpkg_Commands.h" namespace vcpkg {namespace Input { @@ -26,4 +28,15 @@ namespace vcpkg {namespace Input return specs; } + + void check_triplet(const triplet& t, const vcpkg_paths& paths) + { + if (!paths.is_valid_triplet(t)) + { + System::println(System::color::error, "Error: invalid triplet: %s", t.value); + TrackProperty("error", "invalid triplet: " + t.value); + help_topic_valid_triplet(paths); + exit(EXIT_FAILURE); + } + } }} |
