Merge pull request 'fix ssh url parsing' () from ssh-parse-mistake into main

Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/141
This commit is contained in:
Cyborus 2024-11-05 18:48:08 +00:00
commit b658dbbfa4

View file

@ -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)
})
}