From 8069bb9541c7dea60e24ff9d89014001f708f936 Mon Sep 17 00:00:00 2001 From: Adam Karpierz Date: Thu, 15 Jan 2026 10:59:12 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=5Ftermui=5Fimpl.open=5Furl()=20?= =?UTF-8?q?=E2=80=94=20'start'=20on=20Windows=20is=20a=20cmd=20built-in=20?= =?UTF-8?q?command,=20not=20an=20executable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/click/_termui_impl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py index ee8225c4c..5b008bf85 100644 --- a/src/click/_termui_impl.py +++ b/src/click/_termui_impl.py @@ -697,6 +697,7 @@ def _unquote_file(url: str) -> str: finally: null.close() elif WIN: + shell = False if locate: url = _unquote_file(url) args = ["explorer", f"/select,{url}"] @@ -706,8 +707,9 @@ def _unquote_file(url: str) -> str: args.append("/WAIT") args.append("") args.append(url) + shell = True try: - return subprocess.call(args) + return subprocess.call(args, shell=shell) except OSError: # Command not found return 127