Commit 542dc42
authored
Fix Ninja support (#24584)
Fixes #24393 by using subprocess.list2cmdline instead of shlex.join.
Unfortunately, subprocess.list2cmdline is undocumented but apparently
has been available for well over a decade (eg see
https://stackoverflow.com/questions/12130163/how-to-get-resulting-subprocess-command-string)
and, judging by discussions like
https://discuss.python.org/t/why-is-subprocess-list2cmdline-not-documented/25044
is unlikely to be ever removed since it's been long used in the wild.
It does exactly what we want - quote & join a command by Windows rules.1 parent 8cd28a2 commit 542dc42
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
191 | | - | |
192 | | - | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
270 | | - | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
| |||
0 commit comments