mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-05-25 15:16:18 +00:00
Clean up error message
This commit is contained in:
@@ -127,7 +127,7 @@ function ImportRegistryFile {
|
|||||||
# Fallback only helps when the import step failed. If load/unload failed,
|
# Fallback only helps when the import step failed. If load/unload failed,
|
||||||
# retrying fallback will hit the same hive-state problem and adds noisy errors.
|
# retrying fallback will hit the same hive-state problem and adds noisy errors.
|
||||||
if ($usesOfflineHive -and ($regResult.FailureStage -eq 'load' -or $regResult.FailureStage -eq 'unload')) {
|
if ($usesOfflineHive -and ($regResult.FailureStage -eq 'load' -or $regResult.FailureStage -eq 'unload')) {
|
||||||
$errorMessage = "Failed importing registry file '$path'. Offline hive $($regResult.FailureStage) failed: $details. Skipping PowerShell fallback because it requires loading the same hive state."
|
$errorMessage = "Failed importing registry file '$path'. Offline hive $($regResult.FailureStage) failed: $details"
|
||||||
Write-Host $errorMessage -ForegroundColor Red
|
Write-Host $errorMessage -ForegroundColor Red
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
throw $errorMessage
|
throw $errorMessage
|
||||||
|
|||||||
Reference in New Issue
Block a user