Skip to content

fix: handle relative index URLs without panicking - #249

Open
giri256 wants to merge 1 commit into
pyocd:mainfrom
giri256:fix/handle-relative-index-urls
Open

fix: handle relative index URLs without panicking#249
giri256 wants to merge 1 commit into
pyocd:mainfrom
giri256:fix/handle-relative-index-urls

Conversation

@giri256

@giri256 giri256 commented Jul 27, 2026

Copy link
Copy Markdown

Fixes #210

download_vidx() parsed each index URL with unwrap(). A relative URL therefore panicked the update worker before the surrounding retry-and-skip logic could handle the malformed entry.

This propagates the URL parse error through the function's existing Result instead. The caller can then retry and eventually ignore the bad URL without aborting the whole index update.

The regression test reproduces the previous RelativeUrlWithoutBase panic and verifies that the same input now returns an error.

Verification:

  • cargo test -p cmsis-pack update::download::tests::relative_vidx_url_returns_error -- --exact
  • cargo fmt --all -- --check

Signed-off-by: p1 <giridharpavan593@gmail.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.

Handle RelativeUrlWithoutBases error

1 participant