From 553a45bc4ff8df0d8d61a10aca180170a3e28566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20F=C3=A1zik?= Date: Mon, 2 Dec 2024 12:42:56 +0100 Subject: [PATCH] B#142: Fix incorrect assumption about Windows partition drive letter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The partition extension would fail if the system drive had a letter other than "C:" Signed-off-by: Lukáš Fázik --- context-windows/src/context.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context-windows/src/context.ps1 b/context-windows/src/context.ps1 index 0dd55141..faffc3c4 100644 --- a/context-windows/src/context.ps1 +++ b/context-windows/src/context.ps1 @@ -1062,8 +1062,8 @@ function extendPartitions($context) { # Cmdlet 'Get-Partition' is not in older Windows/Powershell versions if (Get-Command -ErrorAction SilentlyContinue -Name Get-Partition) { if ([string]$context['GROW_ROOTFS'] -eq '' -or $context['GROW_ROOTFS'].ToUpper() -eq 'YES') { - # Add at least C: - $drives = "C: $($context['GROW_FS'])" + # Add at least system drive + $drives = "$env:systemdrive $($context['GROW_FS'])" } else { $drives = "$($context['GROW_FS'])"