Skip to content

pack: return error when no devices match - #2018

Open
giri256 wants to merge 1 commit into
pyocd:developfrom
giri256:fix/pack-missing-match-exit-status
Open

pack: return error when no devices match#2018
giri256 wants to merge 1 commit into
pyocd:developfrom
giri256:fix/pack-missing-match-exit-status

Conversation

@giri256

@giri256 giri256 commented Jul 26, 2026

Copy link
Copy Markdown

Fixes #1130.

pyocd pack find and pyocd pack install currently return success when no device matches the requested pattern. This makes failed lookups indistinguishable from successful commands in scripts.

The modern subcommands and their deprecated --find / --install equivalents now return status 1 when the match set is empty. The behavior of pack update is unchanged because a metadata refresh can partially succeed, as discussed in the issue.

Tests:

  • pytest test/unit/test_pack_cmd.py -q — 4 passed
  • pytest test/unit -q — 1104 passed, 41 skipped
  • flake8 pyocd test --count --select=E9,F63,F7,F82 --show-source --statistics — 0 errors
  • python test/import_all.py — 372 modules imported
  • python -m build
  • twine check dist/* — wheel and source archive passed
  • git diff --check

Signed-off-by: Giridhar <80974392+giri256@users.noreply.github.com>
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.

1 participant