Issue Task Resolved

#111483Check for spaces in paths reports ignored files

Benjamin Kott 11/17/26, 17:51 updated 11/18/26, 04:15

Description

Problem

Build/Scripts/spacesInPathsAndFilenames.sh runs in the pre-commit hook and as runTests.sh -s checkFilesAndPathsForSpaces. It scans the whole checkout with find ., including folders git ignores. Chromium of the JavaScript and end to end tests creates .cache/.config/chromium/Crash Reports in the home folder the test containers use, so after any such run every commit reports

>> ERROR: There are spaces in file or path names.
@- ‘./.cache/.config/chromium/Crash Reports’‘@

although nothing of it can be committed. The line also carries a second closing quote.

Related to #104923, which added the check.

Steps to reproduce

  1. Run ./Build/Scripts/runTests.sh -s unitJavascript (or create the folder .cache/.config/chromium/Crash Reports by hand; .cache is ignored).
  2. Run ./Build/Scripts/runTests.sh -s checkFilesAndPathsForSpaces, or commit anything: the check fails on the ignored folder.

Suggested fix

Check the paths git knows instead of the file system: tracked, staged and new files not yet added, without ignored ones (git ls-files --cached --others --exclude-standard), and print each path with one pair of quotes. A new or staged file with a space in its path still fails the check.

Reviews 2

History 13

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-18T04:15:21+00:00" > 11/18/26, 04:15 </span>

    Applied in changeset commit:d0a94326f50206a2bb88ac604989862da0b583b6.