diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-21 19:14:55 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-21 19:14:55 +0300 |
commit | 63a96e85fbdaee59f39947325248039784e9f347 (patch) | |
tree | 648c6ae63219b7e75c3a9dcc53caec58eef98ee5 /mesonbuild/backend/xcodebackend.py | |
parent | 5c26c6c7cb48df1f5e393401178924e816187cd2 (diff) | |
download | meson-63a96e85fbdaee59f39947325248039784e9f347.zip meson-63a96e85fbdaee59f39947325248039784e9f347.tar.gz meson-63a96e85fbdaee59f39947325248039784e9f347.tar.bz2 |
Xcode: fix shell quotings.
Diffstat (limited to 'mesonbuild/backend/xcodebackend.py')
-rw-r--r-- | mesonbuild/backend/xcodebackend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 49e7595..b81b905 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -1114,7 +1114,7 @@ class XCodeBackend(backends.Backend): custom_dict.add_item('runOnlyForDeploymentPostprocessing', 0) custom_dict.add_item('shellPath', '/bin/sh') workdir = self.environment.get_build_dir() - cmdstr = ' '.join([f'\\"{x}\\"' for x in fixed_cmd]) + cmdstr = ' '.join([f"\\'{x}\\'" for x in fixed_cmd]) custom_dict.add_item('shellScript', f'"cd {workdir}; {cmdstr}"') custom_dict.add_item('showEnvVarsInLog', 0) @@ -1494,7 +1494,7 @@ class XCodeBackend(backends.Backend): # b) I don't know why it works or why every backslash must be escaped into eight backslashes a = a.replace(chr(92), 8*chr(92)) # chr(92) is backslash, this how we smuggle it in without Python's quoting grabbing it. a = a.replace(r'"', r'\\\"') - if ' ' in a: + if ' ' in a or "'" in a: a = r'\"' + a + r'\"' quoted_args.append(a) settings_dict.add_item(f'OTHER_{langname}FLAGS', '"' + ' '.join(quoted_args) + '"') |