aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-14 11:55:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-14 11:55:38 +0200
commit5487be65a6f493968c0e997d93bcd5c2d87158ef (patch)
treefaf8f7d528bf4e6c2611c894f6c3165d9fd2488c /bpkg/rep-add.cxx
parentacf830d519ba2b467f5eb0968b44a514b1b0e2b3 (diff)
Add --no-result option to suppress printing informational messages
Diffstat (limited to 'bpkg/rep-add.cxx')
-rw-r--r--bpkg/rep-add.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx
index 6db2c92..704da68 100644
--- a/bpkg/rep-add.cxx
+++ b/bpkg/rep-add.cxx
@@ -16,7 +16,9 @@ using namespace butl;
namespace bpkg
{
shared_ptr<repository>
- rep_add (transaction& t, const repository_location& rl)
+ rep_add (const common_options& o,
+ transaction& t,
+ const repository_location& rl)
{
const string& rn (rl.canonical_name ());
@@ -46,7 +48,7 @@ namespace bpkg
if (added)
db.update (root);
- if (verb)
+ if (verb && !o.no_result ())
text << (added ? "added " : updated ? "updated " : "unchanged ") << rn;
return r;
@@ -76,7 +78,7 @@ namespace bpkg
? optional<repository_type> (o.type ())
: nullopt));
- rep_add (t, rl);
+ rep_add (o, t, rl);
}
t.commit ();