Skip to content

Commit 81e65df

Browse files
pkittenisPanos
authored andcommitted
Bugfix when running without sudo
1 parent 9e6ad25 commit 81e65df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pssh.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def exec_command(self, command, sudo=False, **kwargs):
112112
channel.makefile_stderr('rb'))
113113
if sudo:
114114
command = 'sudo -S bash -c "%s"' % command.replace('"', '\\"')
115+
else:
116+
command = 'bash -c "%s"' % command.replace('"', '\\"')
115117
logger.debug("Running command %s on %s", command, self.host)
116118
channel.exec_command(command, **kwargs)
117119
logger.debug("Command finished executing")

0 commit comments

Comments
 (0)