Show profile selection during setup

This commit is contained in:
Manuel Thalmann 2024-09-08 17:48:02 +02:00
parent 85347231e1
commit 98e97e5be2

View file

@ -3,6 +3,7 @@
function Start-Setup { function Start-Setup {
param($ConfigurationName) param($ConfigurationName)
. "$PSScriptRoot/../../Common/Scripts/Config.ps1";
. "$PSScriptRoot/../../Common/Scripts/Scripting.ps1"; . "$PSScriptRoot/../../Common/Scripts/Scripting.ps1";
$Global:InformationPreference = "Continue"; $Global:InformationPreference = "Continue";
$Global:ErrorActionPreference = "Inquire"; $Global:ErrorActionPreference = "Inquire";
@ -11,6 +12,7 @@ function Start-Setup {
$null = $env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1"; $null = $env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1";
$env:WSLENV = "CONFIG_NAME"; $env:WSLENV = "CONFIG_NAME";
Show-ProfileNamePrompt;
$valhallaConfig = ConvertFrom-Json (Get-Content "$PSScriptRoot/../../../.config/$env:CONFIG_NAME.json"); $valhallaConfig = ConvertFrom-Json (Get-Content "$PSScriptRoot/../../../.config/$env:CONFIG_NAME.json");
[xml]$unattendedConfig = [xml]::new(); [xml]$unattendedConfig = [xml]::new();
$unattendedConfig.PreserveWhitespace = $true; $unattendedConfig.PreserveWhitespace = $true;