From a5ab17b2258f3250cbb873fe51d1d403cd9fdd92 Mon Sep 17 00:00:00 2001 From: rmeijer_huizehetoost Date: Wed, 29 Oct 2025 11:32:15 +0100 Subject: [PATCH] fix apps --- main-menu.ps1 | 8 ++++---- scripts/install-apps.cmd | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main-menu.ps1 b/main-menu.ps1 index e21d6da..1187485 100644 --- a/main-menu.ps1 +++ b/main-menu.ps1 @@ -295,8 +295,8 @@ function Install-MedewerkersApps { $content = Get-Content $medewerkersFile -Raw $apps = @() - # Parse de PowerShell array uit het bestand - if ($content -match '\$apps\s*=\s*@\s*\((.*?)\)') { + # Parse de PowerShell array uit het bestand (multiline pattern) + if ($content -match '(?s)\$apps\s*=\s*@\s*\((.*?)\)') { $appsString = $matches[1] $apps = $appsString -split ',' | ForEach-Object { $_.Trim().Trim('"').Trim("'") } | Where-Object { $_ -ne '' } } @@ -370,8 +370,8 @@ function Install-GastenApps { $content = Get-Content $gastenFile -Raw $apps = @() - # Parse de PowerShell array uit het bestand - if ($content -match '\$apps\s*=\s*@\s*\((.*?)\)') { + # Parse de PowerShell array uit het bestand (multiline pattern) + if ($content -match '(?s)\$apps\s*=\s*@\s*\((.*?)\)') { $appsString = $matches[1] $apps = $appsString -split ',' | ForEach-Object { $_.Trim().Trim('"').Trim("'") } | Where-Object { $_ -ne '' } } diff --git a/scripts/install-apps.cmd b/scripts/install-apps.cmd index 66714eb..3dfbbcf 100644 --- a/scripts/install-apps.cmd +++ b/scripts/install-apps.cmd @@ -133,8 +133,8 @@ try { $content = Get-Content $appsFile -Raw $apps = @() - # Parse the PowerShell array from the file - if ($content -match '\$apps\s*=\s*@\s*\((.*?)\)') { + # Parse the PowerShell array from the file (multiline pattern) + if ($content -match '(?s)\$apps\s*=\s*@\s*\((.*?)\)') { $appsString = $matches[1] $apps = $appsString -split ',' | ForEach-Object { $_.Trim().Trim('"').Trim("'") } | Where-Object { $_ -ne '' } }