Windows: `quarto.path` pointing at a `.cmd`-only dev binary is detected as a file but silently falls back to PATH
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- devtools
調査の方向性
Start in packages/quarto-core/src/context.ts, reading detectUserSpecifiedQuarto, detectQuarto, readQuartoInfo, and the useCmd handling around the referenced lines. Reproduce the Windows setup with package/dist/bin/quarto.cmd and the quarto.path setting, then verify that the configured .cmd binary is version-probed and selected rather than silently falling back to PATH.
索引モデルが issue の本文から書いたものです。
説明
When the user sets quarto.path to an absolute path of a Quarto build that ships only quarto.cmd on Windows (typical for the in-repo dev binary at package/dist/bin/quarto.cmd after ./configure.cmd), the extension's existence check passes but the subsequent version probe fails. The extension then silently falls back to the system PATH, so the user-specified dev binary is never actually used.
Mechanism
detectUserSpecifiedQuarto validates the file exists and is a file (passes for quarto.cmd), then calls detectQuarto(quartoPath):
readQuartoInfo calls execProgram(quartoPath, ["--version"]). On Windows, child_process spawn on an absolute path to a .cmd file fails without shell: true because Windows requires cmd.exe to interpret .cmd files. The catch block retries with quartoPath + ".cmd" — but when the user already passed …\quarto.cmd, the retry becomes …\quarto.cmd.cmd, which does not exist. Both attempts fail, detectQuarto returns undefined, and the extension falls through to the PATH branch.
There is no warning surfaced — detectUserSpecifiedQuarto only warns when fs.existsSync or isFile checks fail, not when the version probe silently fails:
The useCmd flag only adjusts the execution-time path; it does not help at detection time:
Reproduction
On Windows:
- Clone
quarto-dev/quarto-cli, run./configure.cmd. This producespackage/dist/bin/quarto.cmdwith noquarto.exesibling. - In Positron/VS Code settings, set
quarto.pathto the absolute path of thatquarto.cmd. - Reload the window.
- Open a
.qmdand run any Quarto extension command (Preview, Verify Installation, render).
Observed: the dev binary is not used. The extension picks up whatever quarto is on PATH (in my case, a quarto-prerelease install from Scoop).
Quarto output channel log
[info] Activating Quarto extension.
[info] Searching for Quarto CLI...
[info] Checking quarto.path setting: C:/Users/chris/Documents/DEV_R/quarto-cli.worktrees/issue-14533/package/dist/bin/quarto.cmd
[info] Checking system PATH...
[info] Found Quarto 1.10.3 on system PATH
[info] Using Quarto 1.10.3 from C:\Users\chris\scoop\apps\quarto-prerelease\current\bin (found on system PATH)
[info] Activated Quarto extension.
Note: no warning between the quarto.path check and the PATH fallback. The user has no diagnostic indicating their setting was discarded.
Suggestion
We could either:
- Detect a trailing
.cmdonquartoPathat detection time and spawn withshell: true(or wrap incmd /c). - Or trim the trailing
.cmdfromquartoPathbefore passing toreadQuartoInfo, so the fallback at L208 can append.cmdcleanly without producingquarto.cmd.cmd. - Or at minimum, surface a warning when the existence check passes but the version probe fails, so users get a clear diagnostic instead of silent fallback.
This blocks testing dev binaries against the extension end-to-end on Windows, which is what I hit while validating a quarto-cli fix that surfaces only when the extension is the client. Related to #352, which describes a different mechanism (terminal env-var prepend race on non-bash shells) producing the same user-visible symptom ("quarto.path is ignored").
- 主要言語
- TypeScript
- スター
- 652
- フォーク
- 64
- 平均マージ
- 8時間 45分
- マージ済み PR(30日)
- 36
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto のほかの issue
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)対応中かも @Bondrewd-K が 2 日前に担当しました。 オープンbug vscode
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto#1194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto#1139 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
quarto-dev/quarto#1138 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
quarto-dev/quarto#1137 ·
メンテナーはふだん 1 日以内に返信
-
Add dependabot?再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
quarto-dev/quarto#1135 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
lingdojo/kana-dojo#32590 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug p2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bastani-inc/atomic#3703 ·
メンテナーはふだん 1 日以内に返信
-
backend bug difficulty: medium priority: medium reliability
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
trustflow-protocol/trustflow-backend#730 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
firecrawl/firecrawl-mcp-server#548 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信