diff options
author | dataCobra <datacobra@thinkbot.de> | 2024-11-06 09:22:57 +0100 |
---|---|---|
committer | dataCobra <datacobra@thinkbot.de> | 2024-11-06 09:22:57 +0100 |
commit | fb9e3a66353ae84d6ce1d9a5ce80de163124e1a8 (patch) | |
tree | 2704f33a3dfe919256f6922a32192092eb7f141d /src/release.rs | |
parent | Merge pull request 'add creating prs with agit' (#138) from cyborus/agit-main... (diff) | |
download | forgejo-cli-fb9e3a66353ae84d6ce1d9a5ce80de163124e1a8.tar.xz forgejo-cli-fb9e3a66353ae84d6ce1d9a5ce80de163124e1a8.zip |
fix: detaching when using `browse`
Diffstat (limited to 'src/release.rs')
-rw-r--r-- | src/release.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/release.rs b/src/release.rs index 6512014..0b72533 100644 --- a/src/release.rs +++ b/src/release.rs @@ -1,5 +1,5 @@ use clap::{Args, Subcommand}; -use eyre::{bail, eyre, OptionExt}; +use eyre::{bail, eyre, Context, OptionExt}; use forgejo_api::{ structs::{RepoCreateReleaseAttachmentQuery, RepoListReleasesQuery}, Forgejo, @@ -429,7 +429,7 @@ async fn browse_release(repo: &RepoName, api: &Forgejo, name: Option<String>) -> .html_url .as_ref() .ok_or_else(|| eyre::eyre!("release does not have html_url"))?; - open::that(html_url.as_str())?; + open::that_detached(html_url.as_str()).wrap_err("Failed to open URL")?; } None => { let repo_data = api.repo_get(repo.owner(), repo.name()).await?; @@ -438,7 +438,7 @@ async fn browse_release(repo: &RepoName, api: &Forgejo, name: Option<String>) -> .clone() .ok_or_else(|| eyre::eyre!("repository does not have html_url"))?; html_url.path_segments_mut().unwrap().push("releases"); - open::that(html_url.as_str())?; + open::that_detached(html_url.as_str()).wrap_err("Failed to open URL")?; } } Ok(()) |