aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-10-25 11:21:53 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-27 16:08:44 +0300
commitff9ba84426629eb8f66c9c2c65526bad5f733726 (patch)
tree5d4b1b42e84d6fe4099aeb65e6701f4e577957b7 /mesonbuild
parent8b6ea78dfd6a370d93a2d9708539fbdc83d6760a (diff)
downloadmeson-ff9ba84426629eb8f66c9c2c65526bad5f733726.zip
meson-ff9ba84426629eb8f66c9c2c65526bad5f733726.tar.gz
meson-ff9ba84426629eb8f66c9c2c65526bad5f733726.tar.bz2
dependencies/base: Replace windows path separators with \\\\
Replace '\\' with \\\\ in config values args. Otherwise shlex will helpfully remove path separators on windows, resulting in values like: `-Ic:mydataishere` fixup! dependencies/base: Replace windows path separators with /
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index a80423f..0a02816 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -448,6 +448,9 @@ class ConfigToolDependency(ExternalDependency):
def get_config_value(self, args, stage):
p, out, err = Popen_safe([self.config] + args)
+ # This is required to keep shlex from stripping path separators on
+ # Windows. Also, don't put escape sequences in config values, okay?
+ out = out.replace('\\', '\\\\')
if p.returncode != 0:
if self.required:
raise DependencyException(