Skip to content

Commit fdb3022

Browse files
authored
Merge pull request tmux-plugins#239 from FranklinYu/update-verbosely
Show the output of Git pull when updating plugins
2 parents fc412cb + e504b8e commit fdb3022

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/update_plugin.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ pull_changes() {
2626
}
2727

2828
update() {
29-
local plugin="$1"
30-
$(pull_changes "$plugin" > /dev/null 2>&1) &&
31-
echo_ok " \"$plugin\" update success" ||
29+
local plugin="$1" output
30+
output=$(pull_changes "$plugin" 2>&1)
31+
if (( $? == 0 )); then
32+
echo_ok " \"$plugin\" update success"
33+
echo_ok "$(echo "$output" | sed -e 's/^/ | /')"
34+
else
3235
echo_err " \"$plugin\" update fail"
36+
echo_err "$(echo "$output" | sed -e 's/^/ | /')"
37+
fi
3338
}
3439

3540
update_all() {

0 commit comments

Comments
 (0)