File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -308,7 +308,12 @@ function Invoke-DreamSkinCommunityStartAndVerify {
308308 ' -RequireUnpaused -OperationLockTimeoutMilliseconds ' +
309309 " $OperationLockTimeoutMilliseconds "
310310 $startProcess = Start-Process - FilePath $powershell - ArgumentList $argumentLine `
311- - WindowStyle Hidden - Wait - PassThru
311+ - WindowStyle Hidden - PassThru
312+ if (-not $startProcess.WaitForExit ($OperationLockTimeoutMilliseconds )) {
313+ try { Stop-Process - InputObject $startProcess - Force - ErrorAction SilentlyContinue } catch {}
314+ [void ]$startProcess.WaitForExit (15000 )
315+ throw " Dream Skin start verification did not finish within $OperationLockTimeoutMilliseconds ms."
316+ }
312317 if ($startProcess.ExitCode -ne 0 ) {
313318 throw " Dream Skin could not start and visibly verify the active theme (exit code $ ( $startProcess.ExitCode ) )."
314319 }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ $ErrorActionPreference = 'Stop'
88$PortExplicit = $PSBoundParameters.ContainsKey (' Port' )
99$injector = Join-Path $PSScriptRoot ' injector.mjs'
1010. (Join-Path $PSScriptRoot ' common-windows.ps1' )
11+ . (Join-Path $PSScriptRoot ' theme-windows.ps1' )
1112
1213$operationLock = Enter-DreamSkinOperationLock
1314$verifyExitCode = 1
Original file line number Diff line number Diff line change @@ -242,6 +242,8 @@ foreach ($requiredSafety in @(
242242 ' Set-DreamSkinActiveThemeFromSnapshot' ,
243243 ' Get-DreamSkinThemeRuntimeContentFingerprint' ,
244244 ' Invoke-DreamSkinCommunityStartAndVerify' ,
245+ ' WaitForExit($OperationLockTimeoutMilliseconds)' ,
246+ ' Dream Skin start verification did not finish within' ,
245247 ' Move-DreamSkinCommunityRollbackSnapshot' ,
246248 " ['DreamSkinRecovery']" ,
247249 " Join-Path `$ PSScriptRoot 'start-dream-skin.ps1'" ,
Original file line number Diff line number Diff line change @@ -1309,6 +1309,9 @@ try {
13091309 throw ' Start lost the any-registered endpoint fallback for Store auto-updates.'
13101310 }
13111311 $verifyScriptSource = Read-DreamSkinUtf8File - Path (Join-Path $Root ' scripts\verify-dream-skin.ps1' )
1312+ if (-not $verifyScriptSource.Contains (" . (Join-Path `$ PSScriptRoot 'theme-windows.ps1')" )) {
1313+ throw ' Verify must dot-source theme-windows.ps1 before using theme store helpers such as Get-DreamSkinThemePaths.'
1314+ }
13121315 if (-not $verifyScriptSource.Contains (' Get-DreamSkinVerifiedCdpIdentityForAnyRegistered' )) {
13131316 throw ' Verify lost the any-registered endpoint fallback for Store auto-updates.'
13141317 }
You can’t perform that action at this time.
0 commit comments