From 55aec0bf07a1075f06e61424c177404a1b5d2e1f Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 28 Jan 2019 19:21:59 +0100 Subject: [PATCH] Make sure the install doesn't fail if the user opts out of a custom machine key --- src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs b/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs index f71d486f5a..4d64d30e9d 100644 --- a/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs +++ b/src/Umbraco.Web/Install/InstallSteps/ConfigureMachineKey.cs @@ -33,7 +33,7 @@ namespace Umbraco.Web.Install.InstallSteps /// public override Task ExecuteAsync(bool? model) { - if (model.HasValue && model.Value == false) return null; + if (model.HasValue && model.Value == false) return Task.FromResult(null); //install the machine key var fileName = IOHelper.MapPath($"{SystemDirectories.Root}/web.config"); @@ -43,7 +43,7 @@ namespace Umbraco.Web.Install.InstallSteps // Update appSetting if it exists, or else create a new appSetting for the given key and value var machineKey = systemWeb.Descendants("machineKey").FirstOrDefault(); - if (machineKey != null) return null; + if (machineKey != null) return Task.FromResult(null); var generator = new MachineKeyGenerator(); var generatedSection = generator.GenerateConfigurationBlock();