summaryrefslogtreecommitdiffstats
path: root/src/prs.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/prs.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/prs.rs')
-rw-r--r--src/prs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/prs.rs b/src/prs.rs
index 43bfbf5..244d79b 100644
--- a/src/prs.rs
+++ b/src/prs.rs
@@ -1043,7 +1043,7 @@ async fn create_pr(
.path_segments_mut()
.expect("invalid url")
.extend(["compare", &format!("{base}...{head}")]);
- open::that(pr_create_url.as_str())?;
+ open::that_detached(pr_create_url.as_str()).wrap_err("Failed to open URL")?;
} else {
let title = title.ok_or_eyre("title is required")?;
let body = match body {
@@ -1557,7 +1557,7 @@ pub async fn browse_pr(repo: &RepoName, api: &Forgejo, id: u64) -> eyre::Result<
.html_url
.as_ref()
.ok_or_else(|| eyre::eyre!("pr 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(())
}