summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-02 19:24:04 +0200
committerDave Reisner <dreisner@archlinux.org>2011-10-01 05:30:19 +0200
commit0495018de76d5f18a14b3adf6522ff0421aa5d35 (patch)
treefa6633766388ac2139431ae0e49b6e3666c03468
parent9794b3de943908858920e91bc54b4948b6d1468d (diff)
downloadmkinitcpio-0495018de76d5f18a14b3adf6522ff0421aa5d35.tar.gz
mkinitcpio-0495018de76d5f18a14b3adf6522ff0421aa5d35.tar.xz
lsinitcpio: disable color when stdout isn't a tty
This was a copypasta error when taking this from makepkg, which has special concerns in this regard. lsinitcpio should only concern itself with stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xlsinitcpio2
1 files changed, 1 insertions, 1 deletions
diff --git a/lsinitcpio b/lsinitcpio
index ca2b224..95c0500 100755
--- a/lsinitcpio
+++ b/lsinitcpio
@@ -62,7 +62,7 @@ shift $(( OPTIND - 1 ))
declare image=$1
-if [[ -t 2 ]] && (( color )); then
+if [[ -t 1 ]] && (( color )); then
# prefer terminal safe colored and bold text when tput is supported
if tput setaf 0 &>/dev/null; then
NC="$(tput sgr0)"