Skip to content

Commit

Permalink
fix: Fix custom URL handling
Browse files Browse the repository at this point in the history
  • Loading branch information
siketyan committed Feb 14, 2023
1 parent bdff621 commit 32f077e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ impl Cmd {
.resolve(&url)
.and_then(|r| config.profiles.resolve(&r.profile));

info!("Cloning from '{}'", url.to_string());

config.git.strategy.clone.clone_repository(
url,
&path,
Expand Down
4 changes: 4 additions & 0 deletions src/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ impl Url {

impl ToString for Url {
fn to_string(&self) -> String {
if let Some(r) = &self.raw {
return r.to_string();
}

let authority = match &self.user {
Some(u) => format!("{}@{}", u, self.host.to_string()),
_ => self.host.to_string(),
Expand Down

0 comments on commit 32f077e

Please sign in to comment.