fix(reliability): encode str stdin in device_run; smoke drill path fixes + regression tests

This commit is contained in:
2026-08-22 16:23:50 -06:00
parent d954b6e90d
commit eae47d99bf
3 changed files with 36 additions and 7 deletions
@@ -107,6 +107,8 @@ SELF_PAYLOAD_KEY = os.environ.get('PAGER_SELF_PAYLOAD_KEY', 'user~remote_access~
def device_run(args, timeout=20, input_data=None):
try:
if isinstance(input_data, str):
input_data = input_data.encode('utf-8')
p = subprocess.run(args, input=input_data, capture_output=True, timeout=timeout)
return p.returncode, p.stdout.decode('utf-8', 'replace'), p.stderr.decode('utf-8', 'replace')
except FileNotFoundError: