From e2f1d79031abac529604083cd017b503f57db2b9 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 12 Aug 2023 21:12:45 +0200 Subject: [PATCH] fix(ci): only set local url instead of insteadOf Signed-off-by: kjuulh --- crates/dagger-cuddle-please/src/lib.rs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/crates/dagger-cuddle-please/src/lib.rs b/crates/dagger-cuddle-please/src/lib.rs index e85937e..ac379c7 100644 --- a/crates/dagger-cuddle-please/src/lib.rs +++ b/crates/dagger-cuddle-please/src/lib.rs @@ -324,19 +324,15 @@ Host * .await?; let res = if remote_url.starts_with("http") { - res.with_exec(vec![ - "git", - "config", - "--global", - &format!( - "url.ssh://git@{}/.insteadOf", - remote_url - .trim() - .trim_start_matches("https://") - .trim_start_matches("http://") - ), - remote_url.trim(), - ]) + let new_remote_url = format!( + "ssh://git@{}", + remote_url + .trim() + .trim_start_matches("https://") + .trim_start_matches("http://") + ); + println!("new remote_url: {}", new_remote_url); + res.with_exec(vec!["git", "remote", "set-url", "origin", &new_remote_url]) } else { res };