diff options
author | Cyborus <cyborus@noreply.codeberg.org> | 2024-11-06 17:04:18 +0100 |
---|---|---|
committer | Cyborus <cyborus@noreply.codeberg.org> | 2024-11-06 17:04:18 +0100 |
commit | b7a54fbf897e46a64165b5e1da7d34fcd0791401 (patch) | |
tree | 2704f33a3dfe919256f6922a32192092eb7f141d /src/issues.rs | |
parent | Merge pull request 'add creating prs with agit' (#138) from cyborus/agit-main... (diff) | |
parent | fix: detaching when using `browse` (diff) | |
download | forgejo-cli-main.tar.xz forgejo-cli-main.zip |
Merge pull request 'fix: detaching when using `browse`' (#143) from dataCobra/forgejo-cli:detach into mainHEADmain
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/143
Diffstat (limited to 'src/issues.rs')
-rw-r--r-- | src/issues.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/issues.rs b/src/issues.rs index 86785a2..b82f21e 100644 --- a/src/issues.rs +++ b/src/issues.rs @@ -1,7 +1,7 @@ use std::str::FromStr; use clap::{Args, Subcommand}; -use eyre::{eyre, OptionExt}; +use eyre::{eyre, Context, OptionExt}; use forgejo_api::structs::{ Comment, CreateIssueCommentOption, CreateIssueOption, EditIssueOption, IssueGetCommentsQuery, }; @@ -294,7 +294,7 @@ async fn create_issue( .path_segments_mut() .expect("invalid url") .extend(["issues", "new"]); - open::that(issue_create_url.as_str())?; + open::that_detached(issue_create_url.as_str()).wrap_err("Failed to open URL")?; } (None, false) => { eyre::bail!("requires either issue title or --web flag") @@ -483,7 +483,7 @@ pub async fn browse_issue(repo: &RepoName, api: &Forgejo, id: u64) -> eyre::Resu .html_url .as_ref() .ok_or_else(|| eyre::eyre!("issue does not have html_url"))?; - open::that(html_url.as_str())?; + open::that_detached(html_url.as_str()).wrap_err("Failed to open URL")?; Ok(()) } |