diff options
Diffstat (limited to 'toolsrc/src/commands_owns.cpp')
| -rw-r--r-- | toolsrc/src/commands_owns.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
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); + } +} |
