diff --git a/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs b/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs index 5244816ead..a2b74e1445 100644 --- a/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs @@ -159,7 +159,7 @@ namespace Tgstation.Server.Host.Components.Engine Logger.LogTrace("OD repo seems to already exist, attempting load and fetch..."); repo = await repositoryManager.LoadRepository(cancellationToken); - await repo.FetchOrigin( + await repo!.FetchOrigin( progressSection1, null, null, diff --git a/src/Tgstation.Server.Host/Components/Instance.cs b/src/Tgstation.Server.Host/Components/Instance.cs index 0973cd9322..0e448251b0 100644 --- a/src/Tgstation.Server.Host/Components/Instance.cs +++ b/src/Tgstation.Server.Host/Components/Instance.cs @@ -514,6 +514,9 @@ namespace Tgstation.Server.Host.Components Job compileProcessJob; using (var repo = await RepositoryManager.LoadRepository(cancellationToken)) { + if (repo == null) + throw new JobException(Api.Models.ErrorCode.RepoMissing); + var deploySha = repo.Head; if (deploySha == null) { diff --git a/src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs b/src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs index 090e3cad82..596301611a 100644 --- a/src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs +++ b/src/Tgstation.Server.Host/Components/Repository/IRepositoryManager.cs @@ -4,8 +4,6 @@ using System.Threading.Tasks; using Tgstation.Server.Host.Jobs; -#nullable disable - namespace Tgstation.Server.Host.Components.Repository { /// @@ -28,25 +26,25 @@ namespace Tgstation.Server.Host.Components.Repository /// /// The for the operation. /// A resulting in the loaded if it exists, otherwise. - ValueTask LoadRepository(CancellationToken cancellationToken); + ValueTask LoadRepository(CancellationToken cancellationToken); /// /// Clone the repository at . /// /// The of the remote repository to clone. - /// The branch to clone. - /// The username to clone from . - /// The password to clone from . + /// The optional branch to clone. + /// The optional username to clone from . + /// The optional password to clone from . /// The optional for progress of the clone. /// If submodules should be recusively cloned and initialized. /// The for the operation. /// A resulting i the newly cloned , if one already exists. - ValueTask CloneRepository( + ValueTask CloneRepository( Uri url, - string initialBranch, - string username, - string password, - JobProgressReporter progressReporter, + string? initialBranch, + string? username, + string? password, + JobProgressReporter? progressReporter, bool recurseSubmodules, CancellationToken cancellationToken);