Prevent batcat warning from being in output of info.sh
commit0cb884d5012ff5182dd50fc0fbf5769dbd8775a9
authorEthan P <eth-p+git@hidden.email>
dateSat 2 May 2020, 01:15 (7 years ago)
parent7bc4020
diagnostics/info.sh+5
@@ -217,12 +217,17 @@ _run_module() {
217217
218218# Tell the user if their executable isn't named "bat".
219219if [[ "$BAT" != "bat" ]] && [[ "$1" != '-y' ]]; then
220+ trap '_tput rmcup; exit 1' INT
221+ _tput smcup
222+ _tput clear
223+ _tput cup 0 0
220224 _tput setaf 1
221225 printf "The %s executable on your system is named '%s'.\n%s\n" "bat" "$BAT" \
222226 "If your issue is related to installation, please check that this isn't the issue."
223227 _tput sgr0
224228 printf "Press any key to continue...\n"
225229 read -rsn1
230+ _tput rmcup
226231fi
227232
228233# Ask for consent.