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:
Jan Lindemann 2026-06-13 04:43:34 +02:00
commit 048726a1aa
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
5 changed files with 66 additions and 54 deletions

View file

@ -313,7 +313,7 @@ class ExecContext(Base):
await self.open()
try:
ret = Result()
ret = Result(cmd = cmd)
with self.CallContext(
self,
title = title,
@ -421,7 +421,7 @@ class ExecContext(Base):
# be returned by CallContext and is very much allowed
assert cmd_input is not None, 'Invalid: cmd_input is None'
ret = Result()
ret = Result(cmd = cmd)
with self.CallContext(
self,
title = title,