From e6f10cabb7fbdba6fd11bcd109dbe765285c762c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Oct 2015 11:07:03 +0200 Subject: Implement dependents check in drop command Also, add support for commands to return program status. --- bpkg/build.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bpkg/build.cxx') diff --git a/bpkg/build.cxx b/bpkg/build.cxx index ec9de3b..1aeb35d 100644 --- a/bpkg/build.cxx +++ b/bpkg/build.cxx @@ -731,7 +731,7 @@ namespace bpkg map_type map_; }; - void + int build (const build_options& o, cli::scanner& args) { tracer trace ("build"); @@ -1029,12 +1029,12 @@ namespace bpkg } if (o.print_only ()) - return; + return 0; // Ask the user if we should continue. // if (!(o.yes () || yn_prompt ("continue? [Y/n]", 'y'))) - return; + return 1; // Ok, we have the green light. The overall action plan is as follows. // @@ -1230,5 +1230,7 @@ namespace bpkg text << "updated " << sp->name << " " << sp->version; } } + + return 0; } } -- cgit v1.1