1
0
Fork 0
mirror of synced 2024-12-04 14:45:37 -05:00

Merge pull request #239 from FranklinYu/update-verbosely

Show the output of Git pull when updating plugins
This commit is contained in:
Bruno Sutic 2023-01-13 09:03:03 +01:00 committed by GitHub
commit fdb30228b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,10 +26,15 @@ pull_changes() {
}
update() {
local plugin="$1"
$(pull_changes "$plugin" > /dev/null 2>&1) &&
echo_ok " \"$plugin\" update success" ||
local plugin="$1" output
output=$(pull_changes "$plugin" 2>&1)
if (( $? == 0 )); then
echo_ok " \"$plugin\" update success"
echo_ok "$(echo "$output" | sed -e 's/^/ | /')"
else
echo_err " \"$plugin\" update fail"
echo_err "$(echo "$output" | sed -e 's/^/ | /')"
fi
}
update_all() {