aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-12-23 19:05:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-12-28 17:39:03 +0300
commit42ae47c3033a8c9ce70f1e6fb4c88ed70ac679fb (patch)
treebdd2cdbf35b4dfbfbc77763156182f03d497ad16 /bpkg/rep-add.cxx
parentdc5296af63000cddc4b46fc205137c20578cb81f (diff)
Add repository type detection
Diffstat (limited to 'bpkg/rep-add.cxx')
-rw-r--r--bpkg/rep-add.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx
index 6de0738..d18536f 100644
--- a/bpkg/rep-add.cxx
+++ b/bpkg/rep-add.cxx
@@ -27,7 +27,12 @@ namespace bpkg
fail << "repository location argument expected" <<
info << "run 'bpkg help rep-add' for more information";
- repository_location rl (parse_location (args.next ()));
+ repository_location rl (
+ parse_location (args.next (),
+ o.type_specified ()
+ ? optional<repository_type> (o.type ())
+ : nullopt));
+
const string& rn (rl.canonical_name ());
// Create the new repository and add is as a complement to the root.