summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyborus <cyborus@noreply.codeberg.org>2024-11-05 19:48:08 +0100
committerCyborus <cyborus@noreply.codeberg.org>2024-11-05 19:48:08 +0100
commitb658dbbfa47ff3ceb3dd81aafb6250bed070da35 (patch)
treefd057a212976090af976876253f18352c4e25e37
parentMerge pull request 'move `whoami` and `version` into separate modules' (#137)... (diff)
parentfix: incorrect string slicing in ssh url parsing (diff)
downloadforgejo-cli-b658dbbfa47ff3ceb3dd81aafb6250bed070da35.tar.xz
forgejo-cli-b658dbbfa47ff3ceb3dd81aafb6250bed070da35.zip
Merge pull request 'fix ssh url parsing' (#141) from ssh-parse-mistake into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/141
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index b388fab..a9c6b36 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -149,7 +149,7 @@ fn ssh_url_parse(s: &str) -> Result<url::Url, url::ParseError> {
let auth_end = s.find("@").unwrap_or(0);
new_s.push_str(&s[..auth_end]);
- new_s.push_str(&s[..auth_end].replacen(":", "/", 1));
+ new_s.push_str(&s[auth_end..].replacen(":", "/", 1));
url::Url::parse(&new_s)
})
}