Skip to content

Commit

Permalink
fix: Escape paths with spaces in include list from --includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Bauer authored and henryiii committed Aug 14, 2024
1 parent fc97cc4 commit a0fdf01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pybind11/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import annotations

import argparse
import shlex
import sys
import sysconfig

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

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


def main() -> None:
Expand Down

0 comments on commit a0fdf01

Please sign in to comment.