Skip to content

Commit

Permalink
compat: Fix depfile autogen when Ninja emits quotes
Browse files Browse the repository at this point in the history
Which happens when a path contains spaces.
  • Loading branch information
oleavr committed May 9, 2024
1 parent c5052da commit 7ddd751
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compat/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ def call_internal_meson(argv, *args, **kwargs):
shutil.copy(workdir / o.file, state.builddir / o.name)

output_relpath = (workdir / o.name).relative_to(top_builddir).as_posix()
input_paths = subprocess.run([NINJA, "-t", "inputs", o.file],
cwd=workdir,
capture_output=True,
encoding="utf-8",
check=True).stdout.rstrip().split("\n")
input_paths = shlex.split(subprocess.run([NINJA, "-t", "inputs", o.file],
cwd=workdir,
capture_output=True,
encoding="utf-8",
check=True).stdout)
input_entries = []
for raw_path in input_paths:
path = Path(raw_path)
Expand Down

0 comments on commit 7ddd751

Please sign in to comment.