Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alembic's edit fails when editor contains a space #394

Closed
sqlalchemy-bot opened this issue Nov 3, 2016 · 3 comments
Closed

Alembic's edit fails when editor contains a space #394

sqlalchemy-bot opened this issue Nov 3, 2016 · 3 comments
Labels
bug Something isn't working low priority

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by David Pärsson (@davidparsson)

Alembic's edit commands fails when $EDITOR contains a space:

$ echo $EDITOR
subl --wait
$ alembic edit head         
  FAILED: Error executing editor ([Errno 2] No such file or directory: 'subl --wait')
$ which subl
/usr/local/bin/subl

I'm on Alembic v0.8.8.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

this is upstream in python-editor: https://github.com/fmoo/python-editor

using as test.py:

import editor

editor.edit("/home/classic/dev/alembic/setup.py")

output:

#!


[classic@photon2 alembic]$ export EDITOR="vim"
[classic@photon2 alembic]$ .venv/bin/python test.py 
[classic@photon2 alembic]$ export EDITOR="vim -v"
[classic@photon2 alembic]$ .venv/bin/python test.py 
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    editor.edit("/home/classic/dev/alembic/setup.py")
  File "/home/classic/dev/alembic/.venv/lib/python2.7/site-packages/editor.py", line 103, in edit
    proc = subprocess.Popen(args, close_fds=True, stdout=stdout)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Author

David Pärsson (@davidparsson) wrote:

You're absolutely right! Thanks for a quick response.

I've reported the issue here: fmoo/python-editor#11

@sqlalchemy-bot sqlalchemy-bot added low priority bug Something isn't working labels Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority
Projects
None yet
Development

No branches or pull requests

1 participant