Skip to content

Commit

Permalink
Merge pull request #239 from FranklinYu/update-verbosely
Browse files Browse the repository at this point in the history
Show the output of Git pull when updating plugins
  • Loading branch information
bruno- committed Jan 13, 2023
2 parents fc412cb + e504b8e commit fdb3022
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/update_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit fdb3022

Please sign in to comment.