diff --git a/src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs b/src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs index 2940e0d134..5852a58f97 100644 --- a/src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs +++ b/src/Tgstation.Server.Host/Components/Repository/RepositoryManager.cs @@ -127,8 +127,6 @@ namespace Tgstation.Server.Host.Components.Repository CancellationToken cancellationToken) { ArgumentNullException.ThrowIfNull(url); - - logger.LogInformation("Begin clone {url} (Branch: {initialBranch})", url, initialBranch); lock (semaphore) { if (CloneInProgress) @@ -136,12 +134,14 @@ namespace Tgstation.Server.Host.Components.Repository CloneInProgress = true; } + var repositoryPath = ioManager.ResolvePath(); + logger.LogInformation("Begin clone {url} to {path} (Branch: {initialBranch})", url, repositoryPath, initialBranch); + try { using (await SemaphoreSlimContext.Lock(semaphore, cancellationToken)) { logger.LogTrace("Semaphore acquired for clone"); - var repositoryPath = ioManager.ResolvePath(); if (!await ioManager.DirectoryExists(repositoryPath, cancellationToken)) try {