Skip to content

Commit

Permalink
fix: spm - cannot install package with null release name field
Browse files Browse the repository at this point in the history
  • Loading branch information
roele committed Aug 1, 2024
1 parent 886b721 commit 1695eff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use serde_derive::Deserialize;
#[derive(Debug, Deserialize)]
pub struct GithubRelease {
pub tag_name: String,
pub name: String,
pub body: String,
pub name: Option<String>,
pub body: Option<String>,
pub prerelease: bool,
pub created_at: String,
pub published_at: String,
pub published_at: Option<String>,
}

pub fn list_releases(repo: &str) -> eyre::Result<Vec<GithubRelease>> {
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/core/deno.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ impl DenoPlugin {
HTTP_FETCH.json("https://api.github.com/repos/denoland/deno/releases?per_page=100")?;
let versions = releases
.into_iter()
.map(|r| r.name)
.filter(|v| !v.is_empty())
.filter_map(|r| r.name)
.filter(|v| v.starts_with('v'))
.map(|v| v.trim_start_matches('v').to_string())
.unique()
Expand Down

0 comments on commit 1695eff

Please sign in to comment.