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

devtool edit-recipe doesn't work #72

Open
jclsn opened this issue Dec 20, 2021 · 3 comments
Open

devtool edit-recipe doesn't work #72

jclsn opened this issue Dec 20, 2021 · 3 comments

Comments

@jclsn
Copy link

jclsn commented Dec 20, 2021

devtool edit-recipe doesn't find vi. Quentin already found the root of the cause. The EDITOR env variable needs to be passed to Pyrex and all common editors should be installed in the container.

@JoshuaWatt
Copy link
Collaborator

We can't run editors in Pyrex; that route leads to user confusion (since it won't be the user's same editor environment will all their bells and whistles), and image bloat (having to include everyone's favorite $EDITOR in the image).

Instead, I think we need to take a different approach and allow some specific commands to break out of the container. This might look like the main pyrex script creating a UNIX domain socket and passing a reference to it inside the container. A shim script in the container would be set as $EDITOR in the container, but would actually pass all it's arguments back to the main pyrex script outside the container over the domain socket; the main pyrex script would execute the correct command and send the result back over the socket.

@jclsn
Copy link
Author

jclsn commented Jan 6, 2022

Yeah, that sounds like a better solution to me as well, but it will require more work. I was aiming for a quick fix.

@jclsn
Copy link
Author

jclsn commented Jan 30, 2022

I just had an idea: How if you call devtool find-recipe whendevtool edit-recipe is run and pass back the resulting path to the host with | xargs $EDITOR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants