aboutsummaryrefslogtreecommitdiff
path: root/bdep/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-24 13:29:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-24 13:29:06 +0200
commit234428e21adde0ddf60f9665edad3dcfb9fd2584 (patch)
tree28910fd2556f2c6b985762710a3319b981aa151e /bdep/init.cxx
parentefc78a6f3b0d1e0a2278ea5a7f2c502a6b4f00d0 (diff)
Implement --config-create|-C in init and new
Diffstat (limited to 'bdep/init.cxx')
-rw-r--r--bdep/init.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/bdep/init.cxx b/bdep/init.cxx
index 9b0ed37..6fda0a2 100644
--- a/bdep/init.cxx
+++ b/bdep/init.cxx
@@ -21,13 +21,13 @@ namespace bdep
const dir_path& prj,
database& db,
const dir_path& cfg,
+ cli::scanner& args,
bool ca,
bool cc,
optional<bool> cd)
{
const char* m (!ca ? "--config-create" :
- !cc ? "--config-add" :
- nullptr);
+ !cc ? "--config-add" : nullptr);
if (m == nullptr)
fail << "both --config-add and --config-create specified";
@@ -51,13 +51,8 @@ namespace bdep
}
return ca
- ? cmd_config_add (prj,
- db,
- cfg,
- move (name),
- cd,
- move (id))
- : nullptr; // @@ TODO: create
+ ? cmd_config_add ( prj, db, cfg, move (name), cd, move (id))
+ : cmd_config_create (o, prj, db, cfg, args, move (name), cd, move (id));
}
void
@@ -129,7 +124,7 @@ namespace bdep
}
int
- cmd_init (const cmd_init_options& o, cli::scanner&)
+ cmd_init (const cmd_init_options& o, cli::scanner& args)
{
tracer trace ("init");
@@ -200,6 +195,7 @@ namespace bdep
prj,
db,
ca ? o.config_add () : o.config_create (),
+ args,
ca,
cc,
cd));