diff options
author | Ethan P <eth-p+git@hidden.email> | 2020-05-02 01:15:32 -0700 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2020-05-02 10:39:58 +0200 |
commit | 0cb884d5012ff5182dd50fc0fbf5769dbd8775a9 (patch) | |
tree | 27675f48b53491b0ff2514b4873981885cd76c4a | |
parent | 7bc4020a9235e39144d0017e904deb5d62c40b64 (diff) |
Prevent batcat warning from being in output of info.sh
-rwxr-xr-x | diagnostics/info.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/diagnostics/info.sh b/diagnostics/info.sh index a7029867..4a719da9 100755 --- a/diagnostics/info.sh +++ b/diagnostics/info.sh @@ -217,12 +217,17 @@ _run_module() { # Tell the user if their executable isn't named "bat". if [[ "$BAT" != "bat" ]] && [[ "$1" != '-y' ]]; then + trap '_tput rmcup; exit 1' INT + _tput smcup + _tput clear + _tput cup 0 0 _tput setaf 1 printf "The %s executable on your system is named '%s'.\n%s\n" "bat" "$BAT" \ "If your issue is related to installation, please check that this isn't the issue." _tput sgr0 printf "Press any key to continue...\n" read -rsn1 + _tput rmcup fi # Ask for consent. |