From 004a6dffdfa347fe68fb1d11209b5033a4888607 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Tue, 17 Aug 2021 11:22:54 +0200 Subject: [PATCH] Fix installer to overwrite on automation tasks --- doc/31-Changelog.md | 1 + lib/core/installer/tools/ShowInstallerMenu.psm1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index 772bf94..703011a 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -17,6 +17,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#317](https://github.com/Icinga/icinga-powershell-framework/pull/317) Fixes certain file names being too long, causing errors on deploying branches * [#326](https://github.com/Icinga/icinga-powershell-framework/pull/326) Fixes import for module files, by using the full path to the module now instead of the name only, as files could be placed inside a folder which is not listed inside the `$ENV:PSModulePath` * [#327](https://github.com/Icinga/icinga-powershell-framework/pull/327) Fixes possible exception on first import run for certain systems +* [#328](https://github.com/Icinga/icinga-powershell-framework/pull/328) Fixes installer while using installation files or the installation command, which did not overwrite default values with custom values ### Enhancements diff --git a/lib/core/installer/tools/ShowInstallerMenu.psm1 b/lib/core/installer/tools/ShowInstallerMenu.psm1 index 8948390..972f395 100644 --- a/lib/core/installer/tools/ShowInstallerMenu.psm1 +++ b/lib/core/installer/tools/ShowInstallerMenu.psm1 @@ -64,7 +64,7 @@ function Show-IcingaForWindowsInstallerMenu() $SelectionForCurrentMenu = $null; } - if ($StoredValues.Count -eq 0 -And $DefaultValues.Count -ne 0) { + if (($StoredValues.Count -eq 0 -And $DefaultValues.Count -ne 0) -Or $Automated) { $StoredValues = $DefaultValues; }