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
|
### Fixed
|
||||||
|
|
||||||
|
* fix interactive mode detection
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
## [23.07] - 2023-07-04
|
## [23.07] - 2023-07-04
|
||||||
|
|
|
@ -129,10 +129,8 @@ BOLD=''
|
||||||
RESET=''
|
RESET=''
|
||||||
|
|
||||||
# check if stdout is a terminal...
|
# check if stdout is a terminal...
|
||||||
if [ -t 0 ]; then
|
if [ -t 1 ]; then
|
||||||
INTERACTIVE=1
|
INTERACTIVE=1
|
||||||
elif [ -t 1 ]; then
|
|
||||||
INTERACTIVE=0
|
|
||||||
|
|
||||||
# see if it supports colors...
|
# see if it supports colors...
|
||||||
ncolors=$(tput colors)
|
ncolors=$(tput colors)
|
||||||
|
@ -149,6 +147,8 @@ elif [ -t 1 ]; then
|
||||||
BOLD=$(tput bold)
|
BOLD=$(tput bold)
|
||||||
RESET='\e[m'
|
RESET='\e[m'
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
INTERACTIVE=0
|
||||||
fi
|
fi
|
||||||
readonly INTERACTIVE
|
readonly INTERACTIVE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue