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