Skip to content

Commit a0fdf01

Browse files
Markus Bauerhenryiii
Markus Bauer
authored andcommitted
fix: Escape paths with spaces in include list from --includes
1 parent fc97cc4 commit a0fdf01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pybind11/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import annotations
33

44
import argparse
5+
import shlex
56
import sys
67
import sysconfig
78

@@ -22,7 +23,7 @@ def print_includes() -> None:
2223
if d and d not in unique_dirs:
2324
unique_dirs.append(d)
2425

25-
print(" ".join("-I" + d for d in unique_dirs))
26+
print(" ".join(shlex.quote("-I" + d) for d in unique_dirs))
2627

2728

2829
def main() -> None:

0 commit comments

Comments
 (0)