From 9fa8be3ee42039ec227b8cfafe24dec470a34271 Mon Sep 17 00:00:00 2001 From: Ana Maria Martinez Gomez Date: Thu, 23 Nov 2023 15:04:03 +0100 Subject: [PATCH] installer.ps1: Fix CustomStartLayout.xml download Download `CustomStartLayout.xml` after the `%VM_COMMON_DIR%` directory where it is stored has been created. `%VM_COMMON_DIR%` is created by the `common.vm` package. This fixes the custom start layout. --- install.ps1 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.ps1 b/install.ps1 index 5db3ccb..a3f2236 100644 --- a/install.ps1 +++ b/install.ps1 @@ -860,6 +860,16 @@ foreach ($env in $configXml.config.envs.env) { } refreshenv +# Install the common module +# This creates all necessary folders based on custom environment variables +Write-Host "[+] Installing shared module..." +choco install common.vm -y --force +refreshenv + +# Use single config +$configXml.save((Join-Path ${Env:VM_COMMON_DIR} "config.xml")) +$configXml.save((Join-Path ${Env:VM_COMMON_DIR} "packages.xml")) + # Custom Start Layout setup Write-Host "[+] Checking for custom Start Layout file..." $layoutPath = Join-Path ${Env:VM_COMMON_DIR} "CustomStartLayout.xml" @@ -871,16 +881,6 @@ if ([string]::IsNullOrEmpty($customLayout)) { Get-ConfigFile $layoutPath $layoutSource -# Install the common module -# This creates all necessary folders based on custom environment variables -Write-Host "[+] Installing shared module..." -choco install common.vm -y --force -refreshenv - -# Use single config -$configXml.save((Join-Path ${Env:VM_COMMON_DIR} "config.xml")) -$configXml.save((Join-Path ${Env:VM_COMMON_DIR} "packages.xml")) - # Log basic system information to assist with troubleshooting Write-Host "[+] Logging basic system information to assist with any future troubleshooting..." Import-Module "${Env:VM_COMMON_DIR}\vm.common\vm.common.psm1" -Force -DisableNameChecking