aboutsummaryrefslogtreecommitdiff
path: root/bdep/config.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bdep/config.cxx')
-rw-r--r--bdep/config.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/bdep/config.cxx b/bdep/config.cxx
index 765032b..8b35a64 100644
--- a/bdep/config.cxx
+++ b/bdep/config.cxx
@@ -199,15 +199,20 @@ namespace bdep
return r;
}
- // Quote the directory if it contains spaces.
+ // Quote the string/directory if it contains spaces.
//
- static string
- quote (const dir_path& d)
+ static inline string
+ quote (const string& s)
{
- const string& s (d.string ());
return s.find (' ') == string::npos ? s : '"' + s + '"';
}
+ static inline string
+ quote (const dir_path& d)
+ {
+ return quote (d.string ());
+ }
+
void
cmd_config_add_print (diag_record& dr,
const dir_path& prj,
@@ -488,7 +493,8 @@ namespace bdep
const string& type,
bool def,
bool fwd,
- bool asy)
+ bool asy,
+ const strings& args)
{
dr << "bdep config create -d " << quote (prj);
@@ -503,6 +509,9 @@ namespace bdep
dr << (asy ? "" : " --no-auto-sync");
dr << ' ' << quote (path);
+
+ for (const string& a: args)
+ dr << ' ' << quote (a);
}
shared_ptr<configuration>