mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-08-23 08:02:07 +00:00
fix: improve error handling for registry file imports and telemetry scheduled tasks
This commit is contained in:
@@ -26,6 +26,13 @@ Describe 'Import-RegistryFile' {
|
||||
Should -Invoke Invoke-NonBlocking -Times 0 -Exactly
|
||||
}
|
||||
|
||||
It 'returns false when registry file resolution throws' {
|
||||
Mock Get-RegistryFilePathForFeature { throw 'path resolution failed' }
|
||||
|
||||
Import-RegistryFile -message 'Apply' -path 'feature.reg' | Should -BeFalse
|
||||
Should -Invoke Invoke-NonBlocking -Times 0 -Exactly
|
||||
}
|
||||
|
||||
It 'uses the PowerShell writer only in WhatIf mode' {
|
||||
$script:Params = @{ WhatIf = $true }
|
||||
Import-RegistryFile -message 'Apply' -path 'feature.reg' | Should -BeTrue
|
||||
|
||||
Reference in New Issue
Block a user