Print stdout and stderr directly to the invoking terminal, rather than
collecting them and only printing them when the update failed.
Simplifies error handling by having the executor check for the command
exit status and automatically handling dry runs.
Background: I use dein as plugin manager for vim and had setup a custom update command for that in my topgrade config. I forgot to remove it after #857 was merged, so it stuck around. Recently I discovered that vim-airlinehad a rewrite in its git-history, causing the update to fail but without dein returning an error exit status (i.e. it still returned 0). Thus the vim upgrade step would report "Plugins updated", whereas in the custom commands output I could see that it failed to upgrade one plugin. Since the other steps (at least the ones I use) also don't work silently (i.e. without showing me stdout/stderr), I decided to update the vim step to behave the same.
Standards checklist:
[x] The PR title is descriptive.
[x] The code compiles (cargo build)
[x] The code passes rustfmt (cargo fmt)
[x] The code passes clippy (cargo clippy)
[x] The code passes tests (cargo test)
[x] Optional: I have tested the code myself
[x] I also tested that Topgrade skips the step where needed
If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.
As I recall this change was made because most plugin managers would output garbage. Is there any way to change the vim script so that it properly returns 1 when dein fails?
Print stdout and stderr directly to the invoking terminal, rather than collecting them and only printing them when the update failed. Simplifies error handling by having the executor check for the command exit status and automatically handling dry runs.
Background: I use
dein
as plugin manager for vim and had setup a custom update command for that in my topgrade config. I forgot to remove it after #857 was merged, so it stuck around. Recently I discovered thatvim-airline
had a rewrite in its git-history, causing the update to fail but withoutdein
returning an error exit status (i.e. it still returned 0). Thus thevim
upgrade step would report "Plugins updated", whereas in the custom commands output I could see that it failed to upgrade one plugin. Since the other steps (at least the ones I use) also don't work silently (i.e. without showing me stdout/stderr), I decided to update thevim
step to behave the same.Standards checklist:
cargo build
)cargo fmt
)cargo clippy
)cargo test
)If you developed a feature or a bug fix for someone else and you do not have the means to test it, please tag this person here.