mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Truncate some long messages sent to a TTY.
Can be overridden with the --truncate option.
This commit is contained in:
parent
80b55e3742
commit
d2150795ba
2 changed files with 29 additions and 4 deletions
|
@ -79,6 +79,7 @@ def main():
|
|||
args = parse_args()
|
||||
config = args.config(args)
|
||||
display.verbosity = config.verbosity
|
||||
display.truncate = config.truncate
|
||||
display.color = config.color
|
||||
display.info_stderr = (isinstance(config, SanityConfig) and config.lint) or (isinstance(config, IntegrationConfig) and config.list_targets)
|
||||
check_startup()
|
||||
|
@ -149,6 +150,13 @@ def parse_args():
|
|||
action='store_true',
|
||||
help='run ansible commands in debug mode')
|
||||
|
||||
common.add_argument('--truncate',
|
||||
dest='truncate',
|
||||
metavar='COLUMNS',
|
||||
type=int,
|
||||
default=display.columns,
|
||||
help='truncate some long output (0=disabled) (default: auto)')
|
||||
|
||||
test = argparse.ArgumentParser(add_help=False, parents=[common])
|
||||
|
||||
test.add_argument('include',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue