summaryrefslogtreecommitdiffstats
path: root/src/issues.rs
diff options
context:
space:
mode:
authordataCobra <datacobra@thinkbot.de>2024-11-06 09:22:57 +0100
committerdataCobra <datacobra@thinkbot.de>2024-11-06 09:22:57 +0100
commitfb9e3a66353ae84d6ce1d9a5ce80de163124e1a8 (patch)
tree2704f33a3dfe919256f6922a32192092eb7f141d /src/issues.rs
parentMerge pull request 'add creating prs with agit' (#138) from cyborus/agit-main... (diff)
downloadforgejo-cli-fb9e3a66353ae84d6ce1d9a5ce80de163124e1a8.tar.xz
forgejo-cli-fb9e3a66353ae84d6ce1d9a5ce80de163124e1a8.zip
fix: detaching when using `browse`
Diffstat (limited to 'src/issues.rs')
-rw-r--r--src/issues.rs6
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(())
}