aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_import.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-09-30 16:48:16 -0700
committerRobert Schumacher <roschuma@microsoft.com>2016-09-30 16:48:16 -0700
commitcddc4f612ee605788928dafcb6366c6478fdb401 (patch)
tree756a551a9d40cdfd8ed4233620d56dc38058b4ee /toolsrc/src/commands_import.cpp
parent39c0c7152f78f67418f7a0f97fe77699e8ed2d58 (diff)
parentbcb2be360a3ce577fc09fe1ffb6b7e0335ebb889 (diff)
downloadvcpkg-cddc4f612ee605788928dafcb6366c6478fdb401.tar.gz
vcpkg-cddc4f612ee605788928dafcb6366c6478fdb401.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg
Diffstat (limited to 'toolsrc/src/commands_import.cpp')
-rw-r--r--toolsrc/src/commands_import.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp
index b1eae277c..9cfc53d6c 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/commands_import.cpp
@@ -1,17 +1,12 @@
#include "vcpkg_Commands.h"
#include "vcpkg.h"
-#include "vcpkg_System.h"
namespace vcpkg
{
void import_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
- if (args.command_arguments.size() != 3)
- {
- System::println(System::color::error, "Error: %s requires 3 parameters", args.command);
- print_example(Strings::format(R"(%s C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)", args.command).c_str());
- exit(EXIT_FAILURE);
- }
+ static const std::string example = create_example_string(R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)");
+ args.check_exact_arg_count(3, example.c_str());
const fs::path control_file_path(args.command_arguments[0]);
const fs::path include_directory(args.command_arguments[1]);