Repository navigation
Fix dev quarto.cmd when the checkout path contains a space - #15276
Merged
Merged
Conversation
…aces In dev mode the launcher called win_configuration.bat unquoted, so cmd split the checkout path at the first space and DENO stayed empty. The stale-Deno check then fired on every run: it overwrote config/deno-version with the localized "ECHO is off." text and asked the user to retry, and the corrupted file stayed behind afterwards. Quoting that call exposed two more breaks further down the same path: the final launch line passed the deno executable and quarto.ts unquoted, and QUARTO_IMPORT_MAP_ARG wrapped the import map path in doubled quotes, which Deno parses as an unquoted path. The import map argument goes back to single inner quotes, the form it had before the conda plumbing change switched it to the doubled form without a stated reason. The --lock argument added with the Deno lockfile copied the doubled form and fails the same way, so it gets single inner quotes too. The `cd` in the stale-Deno branch is quoted for consistency, although `cd` already accepts an unquoted path with spaces. The bundled branch of the launcher is left unchanged; quarto.exe is the entry point there. The test runs quarto.cmd through a junction whose name contains a space and checks that config/deno-version still holds the configured Deno version. It disables current-directory command lookup for the child so that a regression reaching the stale-Deno branch cannot run configure.cmd against the checkout under test.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
1 of 5 tasks
cderv
added a commit
that referenced
this pull request
Nov 4, 2026
The Windows installers ship quarto.cmd next to quarto.exe. Its bundled launch line passed the Deno executable and quarto.js unquoted, so when the install path contained a space, Deno re-parsed the raw command line, took the rest of its own path as the script, and failed before Quarto started. quarto.exe was not affected. - Quote the Deno executable and quarto.js on the bundled launch line, matching the dev launch line. - Remove QUARTO_IMPORT_MAP_ARG from the bundled branch. It has not been passed to Deno since quarto.cmd was aligned with the POSIX quarto script, and quarto.js is a self-contained bundle. - Add a Windows-only test that runs quarto.cmd from a bundled layout under a directory with a space and checks that it runs quarto.js with its arguments. See #15276, which fixed the same problem in the dev branch.
1 of 5 tasks
cderv
added a commit
that referenced
this pull request
Nov 13, 2026
Plan 33 Task 9 Step 4 replaces quarto.cmd with a full listing written before #15276 and this fix. Pasted as is, it would bring back the argument corruption, the "%1" shortcuts and the unquoted win_configuration.bat call. Per the migration AGENTS.md, the finding goes in the open-decisions table for PR 33's step 0, not into the plan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a quarto-cli checkout under a path containing a space, the dev
quarto.cmdon Windows fails before running anything. It prints'C:\path\with' is not recognized as an internal or external command, reports that Quarto requires reconfiguration to install Deno with an empty version, and exits. Every later run does the same. It also overwritespackage/dist/config/deno-versionwith the localized "ECHO is off." text, which stays behind after moving the checkout back to a normal path.Found while testing the launcher change from #15259 through a directory junction with a space in its name. The problem predates #15259, which added one more instance of it.
Root cause
Several paths in the dev mode branch of
package/scripts/windows/quarto.cmdreach cmd or Deno unquoted:call !QUARTO_ROOT!\win_configuration.batis split at the space, so the script that setsDENOand the other dependency versions never runs. WithDENOempty, the stale Deno check sees a version mismatch, writes the empty value todeno-version(that is the "ECHO is off." text) and asks to retry.src/quarto.tsunquoted.--importmapand--lockwrap their path in doubled quotes (--importmap=""path""), which Deno receives as an unquoted path. The import map argument used single quotes before the conda support changes (conda plumbing #1687, Restore conda with dev mode fix #2015), and the--lockargument from Add Deno lockfile #15259 copied the doubled form.Fix
Quote the
calland the paths on the launch line, and use single inner quotes for--importmapand--lock. Thecdin the stale Deno branch is quoted for consistency only, ascdalready accepts an unquoted path with spaces.The bundled (non-dev) branch is unchanged. Installed Quarto runs through
quarto.exe, which works from such a path, but thequarto.cmdshipped next to it has the same unquoted launch line and is not covered here.The new unit test runs
quarto.cmdthrough a junction whose name contains a space and checks that it succeeds and thatdeno-versionstill holds the configured Deno version. It is Windows only and skipped in binary mode.Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.