diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-08-20 09:09:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-08-20 09:09:22 +0200 |
commit | 4d79c195d440f807e84235a8184b04a9f633cf94 (patch) | |
tree | 3c0f4a2ba118a6ffc588f0852a4721e556bc52e2 /bdep/config.cxx | |
parent | ba8e0b9f9866b47bc61b49323e4293ba90826e80 (diff) |
Allow specifying config type with --type in bdep-config-create, bdep-init
Diffstat (limited to 'bdep/config.cxx')
-rw-r--r-- | bdep/config.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bdep/config.cxx b/bdep/config.cxx index d705355..31f4c14 100644 --- a/bdep/config.cxx +++ b/bdep/config.cxx @@ -54,15 +54,15 @@ namespace bdep if (o.existing () && o.wipe ()) fail << "both --existing|-e and --wipe specified"; - return (o.config_type_specified () ? "--config-type" : - o.default_ () ? "--default" : - o.no_default () ? "--no-default" : - o.forward () ? "--forward" : - o.no_forward () ? "--no-forward" : - o.auto_sync () ? "--auto-sync" : - o.no_auto_sync () ? "--no-auto-sync" : - o.existing () ? "--existing|-e" : - o.wipe () ? "--wipe" : nullptr); + return (o.type_specified () ? "--type|--config-type" : + o.default_ () ? "--default" : + o.no_default () ? "--no-default" : + o.forward () ? "--forward" : + o.no_forward () ? "--no-forward" : + o.auto_sync () ? "--auto-sync" : + o.no_auto_sync () ? "--no-auto-sync" : + o.existing () ? "--existing|-e" : + o.wipe () ? "--wipe" : nullptr); } void @@ -668,7 +668,7 @@ namespace bdep move (path), cfg_args, move (name), - o.config_type (), + o.type (), move (id)); return 0; } @@ -1142,8 +1142,8 @@ namespace bdep if (!c.add () && !c.create () && !c.set ()) fail << n << " not valid for this subcommand"; - if (o.config_type_specified () && !c.create ()) - fail << "--config-type is not valid for this subcommand"; + if (o.type_specified () && !c.create ()) + fail << "--type|--config-type is not valid for this subcommand"; if (o.existing () && !c.create ()) fail << "--existing|-e is not valid for this subcommand"; |