aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-22 22:08:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-22 22:08:16 +0300
commit8b7ee409621b50c1f741188f21f18f98d47e63af (patch)
tree42457d4d59de0dd255494cf41080058334771652
parentbb08cf0b2a2b3a8a9a52d53e6fb4813ac1fa487c (diff)
Quote directory paths in buildspecs
-rw-r--r--bdep/deinit.cxx4
-rw-r--r--bdep/publish.cxx18
-rw-r--r--bdep/sync.cxx4
-rw-r--r--tests/new.testscript2
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