Skip to content

fix: log path-like subprocess arguments without raising - #1041

Closed
Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/pathlike-command-logging
Closed

Shubham-Padkonde wants to merge 1 commit into
google:masterfrom
Shubham-Padkonde:fix/pathlike-command-logging

Conversation

@Shubham-Padkonde

@Shubham-Padkonde Shubham-Padkonde commented Oct 1, 2026 •

Copy link
Copy Markdown

run_command accepts arguments supported by subprocess.Popen, but its final debug-log formatting passes each argument directly to shlex.quote. A pathlib.Path executable therefore runs successfully and then raises TypeError instead of returning its result.

Decode bytes and path-like arguments with os.fsdecode when constructing the display string, including standalone commands. The original arguments passed to the subprocess are unchanged. Tests cover mixed argument types and a real Python subprocess invoked through a Path.

Validation: both new regressions fail before the fix. Full Mobly suite: 826 passed, 5 skipped; 12 destructor warnings report unavailable ADB during snippet-client cleanup. Pyink 24.3.0 and git diff --check pass.

@xpconanfan

xpconanfan commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closing this PR. We do not accept AI-generated PRs targeting synthetic edge cases that contradict our documented API contracts.

@xpconanfan xpconanfan closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants