2016-09-22 00:06:37 -07:00
|
|
|
#include "vcpkg_Commands.h"
|
|
|
|
#include "vcpkg_System.h"
|
|
|
|
#include "vcpkg.h"
|
|
|
|
|
|
|
|
namespace vcpkg
|
|
|
|
{
|
|
|
|
void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
|
|
|
|
{
|
2016-09-30 11:24:04 -07:00
|
|
|
args.check_max_arg_count(1);
|
2016-09-22 00:06:37 -07:00
|
|
|
if (args.command_arguments.size() == 0)
|
|
|
|
{
|
|
|
|
System::println(System::color::error, "Error: owns requires a pattern to search for as the first argument.");
|
2016-09-22 00:40:23 -07:00
|
|
|
print_example("owns .dll");
|
2016-09-22 00:06:37 -07:00
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
StatusParagraphs status_db = database_load_check(paths);
|
|
|
|
search_file(paths, args.command_arguments[0], status_db);
|
|
|
|
exit(EXIT_SUCCESS);
|
|
|
|
}
|
|
|
|
}
|