Check if there is no filename in exc
@@ -13,7 +13,6 @@ from pip._internal.configuration import (
kinds,
)
from pip._internal.exceptions import PipError
-from pip._internal.utils.compat import WINDOWS
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import get_prog, write_output
@@ -227,7 +226,7 @@ class ConfigurationCommand(Command):
try:
subprocess.check_call([editor, fname])
except FileNotFoundError as e:
- if WINDOWS:
+ if not e.filename:
e.filename = editor
raise
except subprocess.CalledProcessError as e:
