Skip to content

fix: restore click.launch() on Windows with subprocess.call#3273

Closed
themavik wants to merge 1 commit intopallets:mainfrom
themavik:fix/2868-launch-windows
Closed

fix: restore click.launch() on Windows with subprocess.call#3273
themavik wants to merge 1 commit intopallets:mainfrom
themavik:fix/2868-launch-windows

Conversation

@themavik
Copy link

Summary

Fixes #3272.
Root cause: Migration from os.system to subprocess.call used incorrect argument format for the Windows start command when opening URLs.
Fix: Invoke start via cmd /c since it is a shell built-in, not an executable.

Changes

  • src/click/_termui_impl.py: Fixed open_url() Windows subprocess invocation

Testing

  • Verified fix addresses reported WinError 2 scenario
  • Change is minimal and follows existing code patterns

Made with Cursor

…3272)

Root cause: Migration from os.system to subprocess.call used incorrect
argument format for the Windows start command when opening URLs.
@davidism davidism closed this Mar 19, 2026
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.

click.launch() broken on Windows in 8.1.8: WinError 2 with subprocess.call

2 participants