Issue Summary
Pre-commit hook fails on Windows when the user’s home directory contains spaces (e.g., C:/Users/First Middle Last/...).
When running git commit, lint-staged passes staged file paths to biome lint without proper quoting. On Windows, paths containing spaces are split into multiple arguments, causing Biome to receive invalid file paths and fail with "no files were processed".
Steps to Reproduce
- Use a Windows machine where the user directory contains spaces (e.g.,
C:/Users/First Middle Last/...)
- Clone the repository and install dependencies
- Modify and stage a file (e.g.,
git add file.tsx)
- Run
git commit
Actual Results
- The pre-commit hook runs
lint-staged
lint-staged passes file paths with spaces to biome lint
- The shell splits the path into multiple arguments
- Biome receives invalid paths (e.g.,
First, Middle, Last/...)
- Biome outputs:
"no files were processed"
lint-staged exits with an error and reverts changes
- The commit fails
Example:
git commit -m "message"
✔ Preparing lint-staged...
⚠ Running tasks for staged files...
❯ lint-staged.config.mjs — 2 files
❯ (apps|packages|companion)/**/*.{js,ts,jsx,tsx} — 2 files
✖ biome lint --reporter summary --config-path=biome-staged.json C:/Users/First Middle Last/Documents/cal.co…
↓ packages/prisma/schema.prisma — no files [SKIPPED]
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...
✖ biome lint --reporter summary --config-path=biome-staged.json C:/Users/First Middle Last/Documents/cal.com/cal.com/apps/web/modules/ee/workflows/components/WorkflowStepContainer.tsx C:/Users/First Middle Last/Documents/cal.com/cal.com/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx:
lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× No files were processed in the specified paths.
i Check your biome.json or biome.jsonc to ensure the paths are not ignored by the configuration.
i These paths were provided but ignored:
C:/Users/First
Middle
Last/Documents/cal.com/cal.com/apps/web/modules/ee/workflows/components/WorkflowStepContainer.tsx
C:/Users/First
Middle
Last/Documents/cal.com/cal.com/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx
Checked 0 files in 5ms. No fixes applied.
husky - pre-commit script failed (code 1)
Expected Results
- File paths passed to
biome lint should be properly quoted or escaped
- Biome should receive valid full file paths
- Linting should run successfully on staged files
- The commit should complete normally
Technical details
- Browser: Brave v1.88.127
- Operating System: Windows 11 Pro
Issue Summary
Pre-commit hook fails on Windows when the user’s home directory contains spaces (e.g.,
C:/Users/First Middle Last/...).When running
git commit,lint-stagedpasses staged file paths tobiome lintwithout proper quoting. On Windows, paths containing spaces are split into multiple arguments, causing Biome to receive invalid file paths and fail with"no files were processed".Steps to Reproduce
C:/Users/First Middle Last/...)git add file.tsx)git commitActual Results
lint-stagedlint-stagedpasses file paths with spaces tobiome lintFirst,Middle,Last/...)"no files were processed"lint-stagedexits with an error and reverts changesExample:
git commit -m "message"
✔ Preparing lint-staged...
⚠ Running tasks for staged files...
❯ lint-staged.config.mjs — 2 files
❯ (apps|packages|companion)/**/*.{js,ts,jsx,tsx} — 2 files
✖ biome lint --reporter summary --config-path=biome-staged.json C:/Users/First Middle Last/Documents/cal.co…
↓ packages/prisma/schema.prisma — no files [SKIPPED]
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...
✖ biome lint --reporter summary --config-path=biome-staged.json C:/Users/First Middle Last/Documents/cal.com/cal.com/apps/web/modules/ee/workflows/components/WorkflowStepContainer.tsx C:/Users/First Middle Last/Documents/cal.com/cal.com/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx:
lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× No files were processed in the specified paths.
i Check your biome.json or biome.jsonc to ensure the paths are not ignored by the configuration.
i These paths were provided but ignored:
C:/Users/First
Middle
Last/Documents/cal.com/cal.com/apps/web/modules/ee/workflows/components/WorkflowStepContainer.tsx
C:/Users/First
Middle
Last/Documents/cal.com/cal.com/packages/ui/components/form/checkbox/MultiSelectCheckboxes.tsx
Checked 0 files in 5ms. No fixes applied.
husky - pre-commit script failed (code 1)
Expected Results
biome lintshould be properly quoted or escapedTechnical details