From b76346651a0e27e8824af4bb59224792df8dd4d0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 30 Mar 2022 17:13:57 +0300 Subject: Fix bdep-status output in JSON format not to fail for non-initialized packages --- bdep/project.hxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'bdep/project.hxx') diff --git a/bdep/project.hxx b/bdep/project.hxx index 9265945..a26dffd 100644 --- a/bdep/project.hxx +++ b/bdep/project.hxx @@ -176,6 +176,10 @@ namespace bdep // default configurations if none were mentioned. Unless validate is false, // also validate that the configuration directories still exist. // + // Fail if --all|-a is specified and the project has no associated + // configurations, unless allow_none is true in which case return an empty + // list of configurations. + // // Besides configurations, also return an indication if they are retrieved // as a fallback to default configurations (true if that's the case). // @@ -186,7 +190,8 @@ namespace bdep const dir_path& prj, transaction&, bool fallback_default = true, - bool validate = true); + bool validate = true, + bool allow_none = false); // Given a directory which can be a project root, a package root, or, if // requested, one of their subdirectories, return the absolute project @@ -245,12 +250,16 @@ namespace bdep project_packages find_project_packages (const dir_paths&, bool ignore_packages, - bool load_packages = true); + bool load_packages = true, + bool allow_empty = false); inline project_packages - find_project_packages (const project_options& po, bool ip, bool lp = true) + find_project_packages (const project_options& po, + bool ip, + bool lp = true, + bool ae = false) { - return find_project_packages (po.directory (), ip, lp); + return find_project_packages (po.directory (), ip, lp, ae); } inline dir_path -- cgit v1.1