mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Add work-around for ssh pty race condition.
This should minimize loss of stdout when using a pty and connecting with ssh or paramiko_ssh.
This commit is contained in:
@@ -178,3 +178,11 @@ class ShellBase(object):
|
||||
if rm_tmp:
|
||||
new_cmd = '%s; rm -rf "%s" %s' % (new_cmd, rm_tmp, self._SHELL_REDIRECT_ALLNULL)
|
||||
return new_cmd
|
||||
|
||||
def append_command(self, cmd, cmd_to_append):
|
||||
"""Append an additional command if supported by the shell"""
|
||||
|
||||
if self._SHELL_AND:
|
||||
cmd += ' %s %s' % (self._SHELL_AND, cmd_to_append)
|
||||
|
||||
return cmd
|
||||
|
||||
Reference in New Issue
Block a user