Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
317 stars 67 forks source link

upload: Clean up error messages from pre-upload scripts #55

Closed brian-kubisiak-skydio closed 2 years ago

brian-kubisiak-skydio commented 2 years ago

When a pre-upload script prints to stdout/stderr, it would print immediately after the "Running pre-upload command" line (without a line break or space). If the command failed, the resulting console error message was empty (resulting in a blank 'E:' line).

Fix both of these by capturing output from the pre-upload script and stuff it into the exception. When the exception is caught later, the stdout/stderr will be printed to the console separately with the 'E:' prefix.

This has the side-effect of suppressing output when the script is successful.

Signed-off-by: Brian Kubisiak brian@kubisiak.com

brian-kubisiak-skydio commented 2 years ago

Reviews in this chain: └https://github.com/Skydio/revup/pull/55 upload: Clean up error messages from pre-upload scripts

brian-kubisiak-skydio commented 2 years ago
# head base diff date summary
0 a9726724 63bb5012 diff Sep 21 1:57 PM 1 file changed, 12 insertions(+), 6 deletions(-)
1 4c09ba03 63bb5012 diff Sep 21 2:09 PM 1 file changed, 1 insertion(+)