Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/nvx_tools/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def _latest_release_asset(
and asset_pattern.fullmatch(name) is not None
and isinstance(asset_url, str)
and isinstance(size, int)
and not isinstance(size, bool)
):
return _ReleaseAsset(tag, name, asset_url, size)
raise ScriptError(f"no GitHub release contains an NVX package for {platform}")
Expand Down
5 changes: 5 additions & 0 deletions scripts/test_nvx_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7284,6 +7284,11 @@ def test_selects_latest_matching_prerelease_asset(self):
"prerelease": True,
"tag_name": "v1.2.3-dev.abc123",
"assets": [
{
"name": "nvx-invalid-linux-kvm.tar.gz",
"url": "https://api.example.invalid/invalid",
"size": True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in cbfdc7f by explicitly rejecting boolean asset sizes in _latest_release_asset().

},
{
"name": "nvx-1.2.3-windows-whp.zip",
"url": "https://api.example.invalid/windows",
Expand Down
Loading