fix interactive mode detection
This commit is contained in:
parent
54fa2ea8eb
commit
e17ce14a67
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue