Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 894875e

Browse files
committed
GitHub.App RepositoryCloneService: Move log error.
- Delete directory may throw errors, so log.Error should be called first.
1 parent 9d4235a commit 894875e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.App/Services/RepositoryCloneService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ public async Task CloneRepository(
223223
}
224224
catch (Exception ex)
225225
{
226-
operatingSystem.Directory.DeleteDirectory(repositoryPath);
227226
log.Error(ex, "Could not clone {CloneUrl} to {Path}", cloneUrl, repositoryPath);
227+
operatingSystem.Directory.DeleteDirectory(repositoryPath);
228228
throw;
229229
}
230230
}

0 commit comments

Comments
 (0)