mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix for whitespace padding on JSON responses
Fixes #17825, closes #17829
This commit is contained in:
@@ -176,7 +176,7 @@ class Shell(object):
|
||||
def sanitize(self, cmd, resp):
|
||||
cleaned = []
|
||||
for line in resp.splitlines():
|
||||
if line.startswith(str(cmd)) or self.find_prompt(line):
|
||||
if line.lstrip().startswith(str(cmd)) or self.find_prompt(line):
|
||||
continue
|
||||
cleaned.append(line)
|
||||
return "\n".join(cleaned)
|
||||
|
||||
Reference in New Issue
Block a user