pip config edit open the editor with options set.
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in main
status = self.run(options, args)
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/configuration.py", line 136, in run
handlers[action](options, args[1:])
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/configuration.py", line 216, in open_in_editor
subprocess.check_call([editor, fname])
File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nvim #--noplugin'
Environment
Description
pip config editis supposed to open the program specified by environment variable Editor if it's set. Actually if the env is a program with its options, pip will treat the whole thing as the program name and throws a FileNotFoundError.Expected behavior
pip config edit open the editor with options set.
How to Reproduce
export EDITOR="nvim --noplugin"; pip config editOutput
My Fix #7391