Skip to content

fix(cli): quote the path deliver --open hands to cmd on Windows - #64

Merged
hyamero merged 1 commit into
stagingfrom
fix/windows-open-quoting
Oct 24, 2026
Merged

hyamero merged 1 commit into
stagingfrom
fix/windows-open-quoting

Conversation

@hyamero

@hyamero hyamero commented Oct 23, 2026

Copy link
Copy Markdown
Member

What and why

On Windows, deliver --open ran cmd /c start "" <path> with windowsVerbatimArguments, so Node passed the path unquoted. Two problems followed:

  • a path with a space (C:\Users\First Last\…) was cut off and didn't open;
  • &, |, ^ or parentheses in a file name made cmd run the rest as a command.

The path is now wrapped in double quotes, inside which cmd takes those characters literally. Windows file names can't contain ". Paths containing % or " aren't opened at all, because cmd expands %VAR% even inside quotes. In that case deliver still writes the file and prints its usual "couldn't open … in a browser" warning. macOS and Linux are unchanged.

How it was checked

  • test/open.test.ts covers:
    • a quoted plain path;
    • spaces, & and parentheses inside the quotes;
    • refusals for % and ";
    • unchanged darwin/linux behaviour.
  • bun run test, bun run typecheck and bun run build pass.
  • Not run on real Windows. A maintainer with Windows could try deliver "C:\Users\<name with space>\d.json" --open once.

@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
stackmap-site Skipped Skipped Oct 23, 2026 4:42pm UTC

@hyamero
hyamero merged commit e80f273 into staging Oct 24, 2026
7 checks passed
@hyamero
hyamero deleted the fix/windows-open-quoting branch October 24, 2026 04:07
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.1-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was previously deployed

1 inactive deployment
Preview — 8e2417be Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant