Guard against loading, saving & executing undefined features (#665)

This commit is contained in:
Jeffrey
2026-06-23 00:41:33 +02:00
committed by GitHub
parent d1fe541b62
commit 5ebc50d36a
11 changed files with 209 additions and 84 deletions

View File

@@ -45,14 +45,8 @@ function PrintPendingChanges {
continue
}
default {
if ($script:Features -and $script:Features.ContainsKey($parameterName)) {
$message = $script:Features[$parameterName].Label
Write-Output "- $message"
}
else {
# Fallback: show the parameter name if no feature description is available
Write-Output "- $parameterName"
}
$message = $script:Features[$parameterName].Label
Write-Output "- $message"
continue
}
}