aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-remove.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-remove.cxx
parentacf830d519ba2b467f5eb0968b44a514b1b0e2b3 (diff)
Add --no-result option to suppress printing informational messages
Diffstat (limited to 'bpkg/rep-remove.cxx')
-rw-r--r--bpkg/rep-remove.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/bpkg/rep-remove.cxx b/bpkg/rep-remove.cxx
index eadb63f..53a7de1 100644
--- a/bpkg/rep-remove.cxx
+++ b/bpkg/rep-remove.cxx
@@ -182,7 +182,8 @@ namespace bpkg
}
void
- rep_remove_clean (const dir_path& c,
+ rep_remove_clean (const common_options& o,
+ const dir_path& c,
database& db,
bool quiet)
{
@@ -216,7 +217,7 @@ namespace bpkg
r->prerequisites.clear ();
db.update (r);
- if (verb >= (quiet ? 2 : 1))
+ if (verb >= (quiet ? 2 : 1) && !o.no_result ())
text << "cleaned " << r->name;
}
else
@@ -285,7 +286,7 @@ namespace bpkg
//
if (o.clean ())
{
- rep_remove_clean (c, db, false /* quiet */);
+ rep_remove_clean (o, c, db, false /* quiet */);
return 0;
}
@@ -383,7 +384,7 @@ namespace bpkg
{
rep_remove (c, t, r.load ());
- if (verb)
+ if (verb && !o.no_result ())
text << "removed " << r.object_id ();
}