lib.Result: Fill "cmd" ctor parameter
Commands executed by ExecContext and its derived classes don't populate the "cmd" parameter of "Result"'s constructor. Fixing that makes for nicer error messages. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0386c351a9
commit
048726a1aa
1 changed files with 66 additions and 54 deletions
|
|
@ -83,7 +83,7 @@ class Local(Base):
|
|||
|
||||
# PTY merges stdout/stderr
|
||||
stdout = b''.join(stdout_chunks) if stdout_chunks else None
|
||||
return Result(stdout, None, exit_code)
|
||||
return Result(stdout, None, exit_code, cmd = cmd)
|
||||
|
||||
# -- non-interactive mode
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ class Local(Base):
|
|||
stdout = b''.join(stdout_parts) if stdout_parts else None
|
||||
stderr = b''.join(stderr_parts) if stderr_parts else None
|
||||
|
||||
return Result(stdout, stderr, exit_code)
|
||||
return Result(stdout, stderr, exit_code, cmd = cmd)
|
||||
|
||||
finally:
|
||||
if cwd is not None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue