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

opam pin add --edit --yes pauses before launching the editor #6038

Open
shym opened this issue Jun 20, 2024 · 0 comments
Open

opam pin add --edit --yes pauses before launching the editor #6038

shym opened this issue Jun 20, 2024 · 0 comments

Comments

@shym
Copy link
Contributor

shym commented Jun 20, 2024

opam pin add --edit pauses before launching the editor even when given --yes and setting OPAMEDITOR.
I would have expected --yes (and --no) to make opam switch to non-interactive mode (maybe it would make more sense to have a dedicated option to set the non-interactive mode, namely picking the default choice, not always yes or no).

Getting a “Press enter to start ...” message before opening an editor in an --edit command made me look again at what git does before opening an editor: it just displays “hint: Waiting for your editor to close the file...” in case something goes wrong there but doesn’t pause (and clears the message as soon as the editor finishes). But maybe we can safely assume git users have an editor configured, opam users less so.

I did get the behaviour I was looking for by running opam pin ... < /dev/null as, in my case, the chosen OPAMEDITOR is not interactive.

(I’m running version 2.1.6 but I think that part of the code didn’t change in master.)

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

1 participant