From 724e692f5420ccabbe741c48bac7c838dbe1a28b Mon Sep 17 00:00:00 2001 From: Kamjar Gerami Date: Mon, 9 May 2016 22:48:46 +0200 Subject: [PATCH] fixes-#15685-tools-that-paginate-show-spurious-less-output: less --version outputs to standard out not to standard error so this changes the redirect from 2> to > (#15720) fixes-#15685-tools-that-paginate-show-spurious-less-output: Updated redirect to include stderr as well as stdout to not show any errors on screen --- lib/ansible/cli/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/cli/__init__.py b/lib/ansible/cli/__init__.py index 00c29524e78..ff8bf754900 100644 --- a/lib/ansible/cli/__init__.py +++ b/lib/ansible/cli/__init__.py @@ -476,7 +476,7 @@ class CLI(object): display.display(text) else: self.pager_pipe(text, os.environ['PAGER']) - elif subprocess.call('(less --version) 2> /dev/null', shell = True) == 0: + elif subprocess.call('(less --version) &> /dev/null', shell = True) == 0: self.pager_pipe(text, 'less') else: display.display(text)