Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions rust/src/codex_accounts/codex_desktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {{
Expand Down Expand Up @@ -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());
Expand Down