From afe1853ab2571a4deaa47857783087ca4f0d07d2 Mon Sep 17 00:00:00 2001 From: Chaos Date: Mon, 20 Mar 2017 17:39:43 -0600 Subject: [PATCH] Resolves #1377 --- lgsm/functions/info_distro.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index d8d733d64..abc3fff59 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -37,12 +37,14 @@ glibcversion="$(ldd --version | sed -n '1s/.* //p')" ## tmux version # e.g: tmux 1.6 -if [ -z "$(command -v tmux)" ]; then +if [ -z "$(command -V tmux)" ]; then tmuxv="${red}NOT INSTALLED!${default}" -elif [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ]; then - tmuxv="$(tmux -V) (>= 1.6 required for console log)" else - tmuxv=$(tmux -V) + if [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then + tmuxv="$(tmux -V) (>= 1.6 required for console log)" + else + tmuxv=$(tmux -V) + fi fi ## Uptime