Skip to content

Fix bare CALL sites in configure.cmd that silently fail on Windows - #14851

Merged
cderv merged 1 commit into
mainfrom
fix-configure-cmd-bare-call
Sep 4, 2026
Merged

Fix bare CALL sites in configure.cmd that silently fail on Windows#14851
cderv merged 1 commit into
mainfrom
fix-configure-cmd-bare-call

Conversation

@cderv

@cderv cderv commented Sep 4, 2026

Copy link
Copy Markdown
Member

When running configure.cmd on Windows, call win_configuration.bat and CALL quarto-bld.cmd configure both fail with "not recognized as an internal or external command", but neither failure is checked, so the script prints its usual success message and exits 0 without ever generating package/dist/bin/quarto.cmd.

Root Cause

cmd.exe resolves a bare .bat/.cmd name (no path separator) through PATH search rather than the current directory. Every other CALL in configure.cmd targets a path with a separator (a relative subdir, a %~dp0-prefixed path, or a full path variable), which cmd.exe always resolves against the current directory - these two were the only bare ones.

Fix

Prefix both call sites with .\ so they resolve as explicit relative paths instead of going through PATH search.

Test Plan

  • Ran configure.cmd on a fresh unconfigured worktree; before the fix it errors with "not recognized" and package/dist/bin/quarto.cmd is never created
  • After the fix, the same fresh worktree run completes and produces package/dist/bin/quarto.cmd, with quarto --version printing correctly

cmd.exe resolves a bare .bat/.cmd name (no path separator) through
PATH search, not the current directory, so `call win_configuration.bat`
and `call quarto-bld.cmd configure` both failed with "not recognized"
and were never checked, leaving package/dist/bin/quarto.cmd unbuilt
while configure.cmd still reported success. Prefixing both with .\
makes them explicit relative paths, which cmd.exe always resolves
against the current directory.
@posit-snyk-bot

posit-snyk-bot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

Status Scan Engine 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 added a commit that referenced this pull request Sep 4, 2026
@cderv
cderv merged commit fdf5a96 into main Sep 4, 2026
51 checks passed
@cderv
cderv deleted the fix-configure-cmd-bare-call branch September 4, 2026 14:27
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.

2 participants