-
Notifications
You must be signed in to change notification settings - Fork 95
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
Exit early on patch failure if bloom is being run non-interactively. #668
Conversation
If git-bloom-release is run non-interactively then that should be propagated to the actions command so that actions are not blocked on interactivity. This patch also makes the minor optimization of only making one copy of the environment to pass to the actions run. I don't think this makes a major difference in performance but it is one less thing to worry about and environment changes from children should not persist to subsequent children or "bubble up" to the parent process.
This is tricky. Some action list entries take Maybe a better approach to running in a script would be to just close tl;dr - this change doesn't make the madness all that much worse, but I'm still not thrilled about it. If it's needed to unblock progress, then I think it's OK to merge. |
I gave this a shot by setting |
This reverts commit a9fe30c. The updated implementation relies on using isatty for interactive terminal detection rather than an exported environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this SO much better. We should change the rosdep rule failure to do the same thing. That way, -y
only suppresses non-failure interactivity. To automatically fail the command instantly, you close stdin.
Another time perhaps.
If git-bloom-release is run non-interactively then that should be
propagated to the actions command so that actions are not blocked on
interactivity.
This patch uses an environment variable to send that message since the action commands do not have a --non-interactive flag and their command-line arguments are all defined statically in the tracks file so using the environment makes more sense than further munging those tracks unless we consider adding a {non-interactive} template to the tracks string, which would require updating all outstanding tracks files, also not my favorite idea.
I haven't audited the code for additional interactive points inside tracks files and I'm not yet sure if I mean to or if I plan to play "whack-a-mole" with them as I find them naturally over time.