Merge pull request #328 from Icinga:fix/installer_ensure_overwrite

Fix: Installer should always overwrite values in automation mode

The installer is not overwriting pre-defined values, in case we run in automation mode. This causes default values being used over custom defined values while using the installation file or the intallation command
This commit is contained in:
Lord Hepipud 2021-08-17 11:26:29 +02:00 committed by GitHub
commit b6b8563f0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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 * [#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` * [#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 * [#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 ### Enhancements

View file

@ -64,7 +64,7 @@ function Show-IcingaForWindowsInstallerMenu()
$SelectionForCurrentMenu = $null; $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; $StoredValues = $DefaultValues;
} }