diff --git a/src/main.rs b/src/main.rs index 26207f8..278bc4b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -117,7 +117,7 @@ fn tci_hook(repo_path: &std::path::PathBuf, tci_script: &str) -> Result<(), TciE name.remove(name.chars().count()); } - let tmp = tempdir::TempDir::new(&format!("tci-{name}"))?; + let tmp = tempdir::TempDir::new(&format!("tci-{}", name.replace('/', "_")))?; // TODO allow customizing clone? just clone recursive? just let hook setup submodules? git2::Repository::clone( @@ -133,7 +133,7 @@ fn tci_hook(repo_path: &std::path::PathBuf, tci_script: &str) -> Result<(), TciE println!("[=] running tci script for repo '{name}'"); std::env::set_current_dir(tmp.path())?; - let res = shell_out(tmp.path().join(tci_script)); + let res = shell_out(tci_path); std::env::set_current_dir(repo_path)?; res