Skip to content

Commit 8069bb9

Browse files
committed
fix: _termui_impl.open_url() — 'start' on Windows is a cmd built-in command, not an executable
1 parent cdab890 commit 8069bb9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/click/_termui_impl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ def _unquote_file(url: str) -> str:
697697
finally:
698698
null.close()
699699
elif WIN:
700+
shell = False
700701
if locate:
701702
url = _unquote_file(url)
702703
args = ["explorer", f"/select,{url}"]
@@ -706,8 +707,9 @@ def _unquote_file(url: str) -> str:
706707
args.append("/WAIT")
707708
args.append("")
708709
args.append(url)
710+
shell = True
709711
try:
710-
return subprocess.call(args)
712+
return subprocess.call(args, shell=shell)
711713
except OSError:
712714
# Command not found
713715
return 127

0 commit comments

Comments
 (0)