fix interactive mode detection

This commit is contained in:
Jérémy Lecour 2023-07-05 12:35:32 +02:00 committed by Jérémy Lecour
parent 54fa2ea8eb
commit e17ce14a67
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
2 changed files with 5 additions and 3 deletions

View file

@ -15,6 +15,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
### Fixed
* fix interactive mode detection
### Security
## [23.07] - 2023-07-04

View file

@ -129,10 +129,8 @@ BOLD=''
RESET=''
# check if stdout is a terminal...
if [ -t 0 ]; then
if [ -t 1 ]; then
INTERACTIVE=1
elif [ -t 1 ]; then
INTERACTIVE=0
# see if it supports colors...
ncolors=$(tput colors)
@ -149,6 +147,8 @@ elif [ -t 1 ]; then
BOLD=$(tput bold)
RESET='\e[m'
fi
else
INTERACTIVE=0
fi
readonly INTERACTIVE