[cli] pyocd commander -W -u 12345: return code always is 0
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
The CLI return code is zero even if pyocd commander cannot connect to target.
The expected behaviour should be return a none-zero code
Reproduce Steps:
# 12345 is a fake unique id
pyocd commander -W -u 12345
No connected debug probe matches unique ID '12345'
# windows check return code
echo %errorlevel%
Background: We are using pyocd commander to do some automation, sometimes the boards cannot be enumrated due to usb power.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported pyocd commander -W -u 12345 reproduction and trace the commander CLI entry point's handling of connection failure. Done means the command returns a non-zero status when no probe matches, with the behavior verified using the Windows %errorlevel% check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100