From a36be905760c402fbe5070f6bcb7041e7c73ce29 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 28 Oct 2019 17:33:13 +0300 Subject: Fix worker to unquote extracted config.install.root value --- bbot/worker/worker.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bbot/worker/worker.cxx') diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 172f5e1..d263a5c 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -265,6 +265,8 @@ run_b (tracer& t, static int bbot:: build (size_t argc, const char* argv[]) { + using string_parser::unquote; + tracer trace ("build"); // Our overall plan is as follows: @@ -357,8 +359,6 @@ build (size_t argc, const char* argv[]) auto parse_arg = [&step_id_str] (const string& a) -> optional> { - using string_parser::unquote; - size_t p (a.find_first_of (":=\"'")); if (p == string::npos || a[p] != ':') // No prefix. @@ -494,7 +494,10 @@ build (size_t argc, const char* argv[]) if (s[n] == '=') ++n; // Skip the equal sign. while (space (s[n])) ++n; // Skip spaces. - install_root = dir_path (s, n, s.size () - n); + // Note that the config.install.root variable value may + // potentially be quoted. + // + install_root = dir_path (unquote (string (s, n, s.size () - n))); break; } } -- cgit v1.1