-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
editor.edit('file')
fails when the defined $EDITOR
contains spaces:
$ touch /tmp/file
$ export EDITOR='vim -v'
$ python -c 'import editor; editor.edit("/tmp/file")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "editor.py", line 103, in edit
proc = subprocess.Popen(args, close_fds=True, stdout=stdout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
After removing the space, it works:
$ export EDITOR='vim'
$ python -c 'import editor; editor.edit("/tmp/file")'
Originally (and improperly) reported here as an Alembic issue.
Metadata
Metadata
Assignees
Labels
No labels