Skip to content

Commit

Permalink
fix parsing github release without name
Browse files Browse the repository at this point in the history
  • Loading branch information
QaidVoid committed Jan 27, 2025
1 parent bec5606 commit b575ab9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "soar-dl"
version = "0.3.2"
version = "0.3.3"
authors = ["Rabindra Dhakal <[email protected]>"]
description = "A fast download manager"
license = "MIT"
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ Options:
--github <GITHUB> Github project
--gitlab <GITLAB> Gitlab project
--ghcr <GHCR> GHCR image or blob
-r, --regex <REGEX_PATTERNS> Regex to select the asset. Only works for github downloads
-r, --regex <REGEX_PATTERNS> Regex to select the asset
-m, --match <MATCH_KEYWORDS> Check if the asset contains given string
-e, --exclude <EXCLUDE_KEYWORDS> Check if the asset contains given string
-y, --yes Skip all prompts and use first
-o, --output <OUTPUT> Output file path
-c, --concurrency <CONCURRENCY> GHCR concurrency
--ghcr-api <GHCR_API> GHCR API to use
--exact-case Whether to use exact case matching for keywords
-h, --help Print help
-V, --version Print version
```
4 changes: 2 additions & 2 deletions src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl ReleasePlatform for Github {

#[derive(Debug, Deserialize)]
pub struct GithubRelease {
name: String,
name: Option<String>,
tag_name: String,
prerelease: bool,
published_at: String,
Expand All @@ -42,7 +42,7 @@ pub struct GithubRelease {

impl Release<GithubAsset> for GithubRelease {
fn name(&self) -> &str {
&self.name
self.name.as_deref().unwrap_or("")
}

fn tag_name(&self) -> &str {
Expand Down

0 comments on commit b575ab9

Please sign in to comment.