From 4f3ce38e01653acc95cd5747beb32079e911c7ea Mon Sep 17 00:00:00 2001 From: reelieuglie Date: Fri, 29 Mar 2024 15:35:41 +0000 Subject: [PATCH] Adding a check to compat.py for 'less' existing --- awscli/compat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awscli/compat.py b/awscli/compat.py index 6ad8ae69ea0f..10bb2fc08163 100644 --- a/awscli/compat.py +++ b/awscli/compat.py @@ -61,11 +61,14 @@ is_macos = sys.platform == 'darwin' +less_exists = os.system('command -v less > /dev/null') + if is_windows: default_pager = 'more' +elif less_exists == '0': + default_pager = 'less' else: - default_pager = 'less -R' - + default_pager = '' class StdinMissingError(Exception): def __init__(self):