fixes issue when piping commands through json with output not specifed
There is an issue when piping cli commands through json but the output is specified as either text or the output is none and the transport is cli. The results would not be loaded properly for conditional evaluation. This is similar to #17422pull/4420/head
parent
37f721f315
commit
c228dfe692
|
@ -283,4 +283,6 @@ def prepare_commands(commands):
|
||||||
for cmd in to_list(commands):
|
for cmd in to_list(commands):
|
||||||
if cmd.output == 'json':
|
if cmd.output == 'json':
|
||||||
cmd.command_string = jsonify(cmd)
|
cmd.command_string = jsonify(cmd)
|
||||||
|
if cmd.command.endswith('| json'):
|
||||||
|
cmd.output = 'json'
|
||||||
yield cmd
|
yield cmd
|
||||||
|
|
Loading…
Reference in New Issue