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 /
pull/4431/head
Dylan Baker 6 years ago committed by Jussi Pakkanen
parent 8b6ea78dfd
commit ff9ba84426
  1. 3
      mesonbuild/dependencies/base.py

@ -448,6 +448,9 @@ class ConfigToolDependency(ExternalDependency):
def get_config_value(self, args, stage): def get_config_value(self, args, stage):
p, out, err = Popen_safe([self.config] + args) 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 p.returncode != 0:
if self.required: if self.required:
raise DependencyException( raise DependencyException(

Loading…
Cancel
Save