feat: only do clone if not exists
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kasper Juul Hermansen 2024-09-24 08:37:29 +02:00
parent 784c7303a5
commit cc70131101
Signed by: kjuulh
SSH Key Fingerprint: SHA256:RjXh0p7U6opxnfd3ga/Y9TCo18FYlHFdSpRIV72S/QM

View File

@ -85,6 +85,14 @@ impl RootCommand {
}
};
let project_path = self
.app
.config
.settings
.projects
.directory
.join(repo.to_rel_path());
if !project_path.exists() {
if clone {
let git_clone = self.app.git_clone();
@ -106,6 +114,9 @@ impl RootCommand {
} else {
tracing::info!("skipping clone for repo: {}", &repo.to_rel_path().display());
}
} else {
tracing::info!("repository already exists");
}
if shell {
self.app.shell().spawn_shell(&repo).await?;