From 72711c8f7827bf53027979eec60c9c17fcba0293 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 24 Mar 2018 08:40:10 +0200 Subject: Minor documentation fixes to sync --- bdep/sync.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bdep/sync.cxx') diff --git a/bdep/sync.cxx b/bdep/sync.cxx index f8a5bed..3d2ee9c 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -78,6 +78,16 @@ namespace bdep { tracer trace ("sync"); + // The --immediate or --recursive option can only be specified with + // an explicit --upgrade or --patch. + // + if (const char* n = (o.immediate () ? "--immediate" : + o.recursive () ? "--recursive" : nullptr)) + { + if (!o.upgrade () && !o.patch ()) + fail << n << " requires explicit --upgrade|-u or --patch|-p"; + } + // We could be running from a package directory (or the user specified one // with -d) that has not been init'ed in this configuration. We want to // diagnose that since such a package will not be present in the bpkg -- cgit v1.1