Skip to content

Fix Windows dart-sass path quoting with spaces#14002

Merged
cderv merged 4 commits intomainfrom
fix/issue-13997
Feb 6, 2026
Merged

Fix Windows dart-sass path quoting with spaces#14002
cderv merged 4 commits intomainfrom
fix/issue-13997

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Feb 5, 2026

Summary

  • Fix dart-sass execution failing when Quarto is installed in paths with spaces (e.g., C:\Program Files\)
  • Add unit tests for Windows path quoting utilities and dart-sass spaced path handling

Root Cause

On Windows, when both the dart-sass executable path AND the arguments contain spaces, Deno's process execution fails to properly handle the quoting. The error appears as:

Der Befehl "C:\Program" ist entweder falsch geschrieben oder

Fix

Refactored dartCommand() to use existing safeWindowsExec() and requireQuoting() utilities from windows.ts on Windows. These utilities:

  1. Quote arguments containing spaces or shell metacharacters
  2. Write the command to a temp batch file and execute via cmd /c to avoid Deno's quoting issues

Fixes #13997

🤖 Generated with Claude Code

Deno has a bug when executing .bat files where both the command path
and arguments contain spaces. This causes dart-sass to fail when
Quarto is installed in C:\Program Files\ and project paths have spaces.

Use safeWindowsExec on Windows to write the command to a temp batch
file with proper quoting, bypassing Deno's buggy command-line handling.

Closes #13997

Co-Authored-By: Claude <noreply@anthropic.com>
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Feb 5, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv merged commit def4986 into main Feb 6, 2026
51 checks passed
@cderv cderv deleted the fix/issue-13997 branch February 6, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Error "C:\Program spelling error"

2 participants