diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-10-13 11:57:07 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-10-13 11:57:07 +0300 |
commit | f11e0849d09aeb3926d160d794b4b8106051e5c6 (patch) | |
tree | 74db5618bf2078f07c111372bc8e16f9e57c9824 /bdep/config.cxx | |
parent | e8ce49e5fda4432147aa86cf65c4c2479e52ee32 (diff) |
Fix sync command to pass configuration arguments to bpkg during automatic configuration creation
Diffstat (limited to 'bdep/config.cxx')
-rw-r--r-- | bdep/config.cxx | 19 |
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> |