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/rep-create.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bpkg/rep-create.cxx') diff --git a/bpkg/rep-create.cxx b/bpkg/rep-create.cxx index 291374e..1f0e420 100644 --- a/bpkg/rep-create.cxx +++ b/bpkg/rep-create.cxx @@ -131,7 +131,7 @@ namespace bpkg throw failed (); } - void + int rep_create (const rep_create_options& o, cli::scanner& args) try { @@ -195,9 +195,12 @@ namespace bpkg d.normalize (); text << pm.size () << " package(s) in " << d; } + + return 0; } catch (const invalid_path& e) { - fail << "invalid path: '" << e.path () << "'"; + error << "invalid path: '" << e.path () << "'"; + throw failed (); } } -- cgit v1.1