aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-10-28 17:33:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-10-28 17:37:36 +0300
commita36be905760c402fbe5070f6bcb7041e7c73ce29 (patch)
treec9d0a7596b069223b3ca45e02f1377ddd374e883
parenta6d27c3bca9e9ed591ae4a6e90666a027dcef2b0 (diff)
Fix worker to unquote extracted config.install.root value
-rw-r--r--bbot/worker/worker.cxx9
1 files changed, 6 insertions, 3 deletions
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<pair<string, string>>
{
- 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;
}
}