aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-22 00:06:37 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-22 00:06:37 -0700
commit4f80532991f5b9d4d1eae455a91f289e9bea081a (patch)
tree5b95aa3543197f4adb4fe99ea927aeb780ae2b1f /toolsrc/src
parent1339080a90a7a7344ae1da7003a380919d828ff0 (diff)
downloadvcpkg-4f80532991f5b9d4d1eae455a91f289e9bea081a.tar.gz
vcpkg-4f80532991f5b9d4d1eae455a91f289e9bea081a.zip
Place owns_command() in a separate cpp file
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/commands_other.cpp16
-rw-r--r--toolsrc/src/commands_owns.cpp23
2 files changed, 23 insertions, 16 deletions
diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp
index 2cafd5453..0c56e0f79 100644
--- a/toolsrc/src/commands_other.cpp
+++ b/toolsrc/src/commands_other.cpp
@@ -73,22 +73,6 @@ namespace vcpkg
exit(EXIT_SUCCESS);
}
- void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
- {
- args.check_max_args(1);
- if (args.command_arguments.size() == 0)
- {
- System::println(System::color::error, "Error: owns requires a pattern to search for as the first argument.");
- std::cout <<
- "example:\n"
- " vcpkg owns .dll\n";
- exit(EXIT_FAILURE);
- }
- StatusParagraphs status_db = database_load_check(paths);
- search_file(paths, args.command_arguments[0], status_db);
- exit(EXIT_SUCCESS);
- }
-
void internal_test_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& /*paths*/)
{
// auto data = FormatEventData("test");
diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/commands_owns.cpp
new file mode 100644
index 000000000..1c54b35f7
--- /dev/null
+++ b/toolsrc/src/commands_owns.cpp
@@ -0,0 +1,23 @@
+#include "vcpkg_Commands.h"
+#include "vcpkg_System.h"
+#include "vcpkg.h"
+#include <iostream>
+
+namespace vcpkg
+{
+ void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
+ {
+ args.check_max_args(1);
+ if (args.command_arguments.size() == 0)
+ {
+ System::println(System::color::error, "Error: owns requires a pattern to search for as the first argument.");
+ std::cout <<
+ "example:\n"
+ " vcpkg owns .dll\n";
+ exit(EXIT_FAILURE);
+ }
+ StatusParagraphs status_db = database_load_check(paths);
+ search_file(paths, args.command_arguments[0], status_db);
+ exit(EXIT_SUCCESS);
+ }
+}