diff options
Diffstat (limited to 'bdep/init.cxx')
-rw-r--r-- | bdep/init.cxx | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/bdep/init.cxx b/bdep/init.cxx index 303c475..f03b7cc 100644 --- a/bdep/init.cxx +++ b/bdep/init.cxx @@ -170,38 +170,40 @@ namespace bdep return 0; } - // Make sure everyone refers to the same objects across all the - // transactions. - // - session s; - - // --config-add/create - // configurations cfgs; - if (ca || cc) { - cfgs.push_back ( - cmd_init_config ( - o, - o, - prj, - db, - ca ? o.config_add () : o.config_create (), - args, - ca, - cc)); - - // Fall through. - } + // Make sure everyone refers to the same objects across all the + // transactions. + // + session s; - // If this is the default mode, then find the configurations the user - // wants us to use. - // - if (cfgs.empty ()) - { - transaction t (db.begin ()); - cfgs = find_configurations (prj, t, o); - t.commit (); + // --config-add/create + // + if (ca || cc) + { + cfgs.push_back ( + cmd_init_config ( + o, + o, + prj, + db, + ca ? o.config_add () : o.config_create (), + args, + ca, + cc)); + + // Fall through. + } + + // If this is the default mode, then find the configurations the user + // wants us to use. + // + if (cfgs.empty ()) + { + transaction t (db.begin ()); + cfgs = find_configurations (prj, t, o); + t.commit (); + } } // Initialize each package in each configuration. |