mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-28 07:27:18 +01:00
Improved workaround for submodule update error
This commit is contained in:
@@ -963,8 +963,12 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
// workaround for https://github.com/libgit2/libgit2/issues/3820
|
||||
// kill off the modules/ folder in .git and try again
|
||||
CheckBadCredentialsException(ex);
|
||||
logger.LogWarning(ex, "Initial update of submodule {0} failed. Deleting .git submodule directory and re-attempting...", submodule.Name);
|
||||
await ioMananger.DeleteDirectory($".git/modules/{submodule.Path}", cancellationToken).ConfigureAwait(false);
|
||||
logger.LogWarning(ex, "Initial update of submodule {0} failed. Deleting submodule directories and re-attempting...", submodule.Name);
|
||||
|
||||
await Task.WhenAll(
|
||||
ioMananger.DeleteDirectory($".git/modules/{submodule.Path}", cancellationToken),
|
||||
ioMananger.DeleteDirectory(submodule.Path, cancellationToken))
|
||||
.ConfigureAwait(false);
|
||||
|
||||
logger.LogTrace("Second update attempt for submodule {0}...", submodule.Name);
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user