diff options
author | Cyborus <cyborus@noreply.codeberg.org> | 2024-11-05 19:48:08 +0100 |
---|---|---|
committer | Cyborus <cyborus@noreply.codeberg.org> | 2024-11-05 19:48:08 +0100 |
commit | b658dbbfa47ff3ceb3dd81aafb6250bed070da35 (patch) | |
tree | fd057a212976090af976876253f18352c4e25e37 | |
parent | Merge pull request 'move `whoami` and `version` into separate modules' (#137)... (diff) | |
parent | fix: incorrect string slicing in ssh url parsing (diff) | |
download | forgejo-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.rs | 2 |
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) }) } |