Since the command does not returns '\n', and plumbum echoes the returncode after the command output (full_cmd += "echo $? ; echo '%s'" % (marker, )), the readline interpretes the returncode as a part of the command output.
A simple snnipet that breaks:
from plumbum import local
session = local.session()
session.run('echo -n abc')
python 2.7 plumbum 1.6.8
Command which output does not ends with
'\n'
breaks running with session().run().The problem occurs at the method
communicate()
ofplumbum.machines.session.SessionPopen
on the line 144:Since the command does not returns '\n', and plumbum echoes the returncode after the command output (
full_cmd += "echo $? ; echo '%s'" % (marker, )
), the readline interpretes the returncode as a part of the command output.A simple snnipet that breaks:
Plumbum will generate the following command:
And it's output will be (before trying to get the retcode and raising the Exception):
Here is the traceback: