Avoid reading shell env twice to get editor
Its cached, but still...
This commit is contained in:
parent
a9f80fe05b
commit
726c693edf
1 changed files with 2 additions and 1 deletions
|
|
@ -541,7 +541,8 @@ def get_editor_from_env(env: Mapping[str, str]) -> str | None:
|
|||
|
||||
|
||||
def get_editor_from_env_vars(opts: Options | None = None) -> list[str]:
|
||||
editor = get_editor_from_env(os.environ)
|
||||
from .child import default_env
|
||||
editor = get_editor_from_env(default_env())
|
||||
if not editor:
|
||||
shell_env = read_shell_environment(opts)
|
||||
editor = get_editor_from_env(shell_env)
|
||||
|
|
|
|||
Loading…
Reference in a new issue