From a6f2a14c328000950f6055ab41c967145ec718db Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 10 Mar 2021 22:15:57 +0300 Subject: Make bdep fail if -d option doesn't refer to project or package root --- bdep/new.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bdep/new.cxx') diff --git a/bdep/new.cxx b/bdep/new.cxx index 4cf7cc9..b531242 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -761,8 +761,9 @@ cmd_new (cmd_new_options&& o, cli::group_scanner& args) // Get the actual project/package information as "seen" from the output // directory. // - project_package pp ( - find_project_package (out, true /* ignore_not_found */)); + project_package pp (find_project_package (out, + true /* allow_subdir */, + true /* ignore_not_found */)); // Finalize the tentative project directory and do some sanity checks // (nested packages, etc; you would be surprised what people come up @@ -3034,6 +3035,7 @@ options_files (const char*, const cmd_new_options& o, const strings&) // Get the actual project directory. // project_package pp (find_project_package (*start, + true /* allow_subdir */, true /* ignore_not_found */)); if (!pp.project.empty ()) -- cgit v1.1