Need to install the physical files from the package that was missing in this installer flow

This commit is contained in:
Warren Buckley
2019-02-12 14:22:26 +00:00
parent 47aec9768c
commit 00082a87fa

View File

@@ -32,13 +32,25 @@ namespace Umbraco.Web.Install.InstallSteps
var previousStep = installSteps.Single(x => x.Name == "StarterKitDownload");
var packageId = Convert.ToInt32(previousStep.AdditionalData["packageId"]);
InstallBusinessLogic(packageId);
InstallFiles(packageId);
UmbracoApplication.Restart(_httContext);
InstallBusinessLogic(packageId);
UmbracoApplication.Restart(_httContext);
return Task.FromResult<InstallSetupResult>(null);
}
private void InstallFiles(int packageId)
{
var definition = _packagingService.GetInstalledPackageById(packageId);
if (definition == null) throw new InvalidOperationException("Not package definition found with id " + packageId);
var packageFile = new FileInfo(definition.PackagePath);
_packagingService.InstallCompiledPackageFiles(definition, packageFile, _umbracoContext.Security.GetUserId().ResultOr(-1));
}
private void InstallBusinessLogic(int packageId)
{
var definition = _packagingService.GetInstalledPackageById(packageId);
@@ -46,7 +58,7 @@ namespace Umbraco.Web.Install.InstallSteps
var packageFile = new FileInfo(definition.PackagePath);
_packagingService.InstallCompiledPackageData(definition, packageFile, _umbracoContext.Security.GetUserId().ResultOr(0));
_packagingService.InstallCompiledPackageData(definition, packageFile, _umbracoContext.Security.GetUserId().ResultOr(-1));
}
public override bool RequiresExecution(object model)