Commit 65faeb45 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

Merge branch 'fix_issue_editor' into '1.4.x'

Check that VISUAL or EDITOR is set in the environment for edit command

See merge request !33
parents 0cf41ae9 ab392626
Pipeline #20554 passed with stages
in 24 minutes and 56 seconds
......@@ -575,9 +575,9 @@ def edit_local_file(prefix, editor, type, name):
if os.path.isfile(object_path):
# check if editor set
if editor is None:
if len(os.environ['VISUAL']) > 0:
if 'VISUAL' in os.environ and len(os.environ['VISUAL']) > 0:
editor = os.environ['VISUAL']
elif len(os.environ['EDITOR']) > 0:
elif 'EDITOR' in os.environ and len(os.environ['EDITOR']) > 0:
editor = os.environ['EDITOR']
logger.error("No default editor set in your environment variable")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment