From 8b7ee409621b50c1f741188f21f18f98d47e63af Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Aug 2019 22:08:16 +0300 Subject: Quote directory paths in buildspecs --- bdep/deinit.cxx | 4 ++-- bdep/publish.cxx | 18 ++++++++++-------- bdep/sync.cxx | 4 ++-- tests/new.testscript | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bdep/deinit.cxx b/bdep/deinit.cxx index 55f43ab..735b746 100644 --- a/bdep/deinit.cxx +++ b/bdep/deinit.cxx @@ -70,8 +70,8 @@ namespace bdep run_b (o, "disfigure:", - src.representation () + '@' + out.representation () + - ",forward"); + "'" + src.representation () + "'@'" + out.representation () + + "',forward"); } } diff --git a/bdep/publish.cxx b/bdep/publish.cxx index d3ea1c0..1fcc942 100644 --- a/bdep/publish.cxx +++ b/bdep/publish.cxx @@ -249,14 +249,16 @@ namespace bdep // build2's version module by default does not allow distribution of // uncommitted projects. // - run_b (o, - "dist:", (dir_path (cfg) /= p.name.string ()).representation (), - "config.dist.root=" + dr.representation (), - "config.dist.archives=tar.gz", - "config.dist.checksums=sha256", - (uncommitted && *uncommitted - ? "config.dist.uncommitted=true" - : nullptr)); + run_b ( + o, + "dist:", + "'" + (dir_path (cfg) /= p.name.string ()).representation () + "'", + "config.dist.root='" + dr.representation () + "'", + "config.dist.archives=tar.gz", + "config.dist.checksums=sha256", + (uncommitted && *uncommitted + ? "config.dist.uncommitted=true" + : nullptr)); // This is the canonical package archive name that we expect dist to // produce. diff --git a/bdep/sync.cxx b/bdep/sync.cxx index 7599148..25431d6 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -442,8 +442,8 @@ namespace bdep dir_path out (dir_path (cfg) /= pkg.name.string ()); run_b (co, o, - src.representation () + '@' + out.representation () + - ",forward"); + "'" + src.representation () + "'@'" + out.representation () + + "',forward"); } } } diff --git a/tests/new.testscript b/tests/new.testscript index 57263bd..84f2026 100644 --- a/tests/new.testscript +++ b/tests/new.testscript @@ -818,7 +818,7 @@ status += -d prj chmod u+x hook; - $* -t lib --subdirectory libprj -d prj/prj --post-hook "$~/hook" \ + $* -t lib --subdirectory libprj -d prj/prj --post-hook "'$~/hook'" \ >>"EOO" 2>>/"EOE" &prj/prj/libprj/*** $~/prj/prj/libprj subdirectory $~/prj/prj -- cgit v1.1