diff --git a/tools/stubs/update-stubs.sh b/tools/stubs/update-stubs.sh index 2aa5a9cee421f..d63a512e711ab 100755 --- a/tools/stubs/update-stubs.sh +++ b/tools/stubs/update-stubs.sh @@ -44,10 +44,14 @@ function fetch_plugin { echo "Unzipping..." local D=$PWD cd "$WORK_DIR" - cols=$( tput cols ) - unzip "$slug.zip" | while read -r line; do - printf '\r\e[0K%.*s' "$cols" "$line" - done + if [[ -n "$TERM" && -t 1 ]]; then + cols=$( tput cols ) + unzip "$slug.zip" | while read -r line; do + printf '\r\e[0K%.*s' "$cols" "$line" + done + else + unzip "$slug.zip" + fi cd "$D" printf '\r\e[0KDone!\n' }