diff --git a/rust/src/codex_accounts/codex_desktop.rs b/rust/src/codex_accounts/codex_desktop.rs index 10eeedcf5c8..62b91f4c562 100644 --- a/rust/src/codex_accounts/codex_desktop.rs +++ b/rust/src/codex_accounts/codex_desktop.rs @@ -347,7 +347,8 @@ mod tests { std::fs::write(session.join("unrelated-file"), b"preserve").unwrap(); let script = format!( r#" -$fixturePackage = {package} +# Match the restart script: Windows may expand an 8.3 temp path here. +$fixturePackage = [System.IO.Path]::GetFullPath({package}) $script:stopped = $false function Get-AppxPackage {{ [pscustomobject]@{{ InstallLocation = $fixturePackage; Version = '1.0' }} }} function Get-CimInstance {{ @@ -389,8 +390,12 @@ if (-not $script:stopped -or -not $script:launched) {{ throw 'Restart did not co .unwrap(); assert!( output.status.success(), - "{}", - String::from_utf8_lossy(&output.stderr) + "exit={:?} stdout={} stderr={} fixture_log={}", + output.status.code(), + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr), + std::fs::read_to_string(dir.path().join("support/codex-desktop-restart.log")) + .unwrap_or_default() ); assert!(!session.join("Local Storage").exists()); assert!(!session.join("Preferences").exists());