-
Notifications
You must be signed in to change notification settings - Fork 349
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
Programs called from opam hooks need a way to display information to the user #4359
Comments
Note: this is related to opam Another possible solution that was discussed: allow output from pre/post-session hooks, and let the plugin gather its own messages. |
I don't really understand the overall feature request. What does |
@avsm It's the other way around, it's expected to be set as a |
Let's take another example: if a package tries to read/write the /etc/passwd, sandboxing (in opam hooks) will prevent it, but the package will still be able to catch the error and install itself normally, and the user will notice nothing. It would be better to report to the user that the package tried to access /etc/passwd, even if it didn't manage to do it. For that, programs called from opam hooks should be able to display messages at the end of the session. |
Thanks, the original issue seemed to imply some interaction with plugins that I didn't understand. It's now clearer that it refers to the hooks mechanism instead. |
For
opam-bin
, I would like to display information to the user about what happened during anopam install
command, for example the number of binary packages that were built, and, if some binary packages could not be built, why, without making the full opam command fail.A possibility would be to write append some text at the end of a file
$OPAM_SWITCH_PREFIX/.opam-switch/plugins/post-install-message.txt
for example, that would be cleared at the beginning of the session and displayed at the end.The text was updated successfully, but these errors were encountered: