aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-create.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-10-22 11:07:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-10-22 11:07:03 +0200
commite6f10cabb7fbdba6fd11bcd109dbe765285c762c (patch)
tree350e0bf1230e930d2c9512eab396a80ffc98b610 /bpkg/rep-create.cxx
parent56af938cd423c1b6730d753ba1ce7b70cd660c29 (diff)
Implement dependents check in drop command
Also, add support for commands to return program status.
Diffstat (limited to 'bpkg/rep-create.cxx')
-rw-r--r--bpkg/rep-create.cxx7
1 files changed, 5 insertions, 2 deletions
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 ();
}
}