Files
codex/.github/scripts/setup-dev-drive.ps1
2026-05-07 12:16:01 -07:00

22 lines
568 B
PowerShell

# Configure a fast drive for Windows CI jobs.
#
# If the runner already exposes `D:`, prefer it directly. Otherwise fall back
# to `C:` without trying to provision a new volume in CI.
if (Test-Path "D:\") {
Write-Output "Using existing drive at D:"
$Drive = "D:"
} else {
Write-Warning "No D: drive available; falling back to C:"
$Drive = "C:"
}
$Tmp = "$Drive\codex-tmp"
New-Item -Path $Tmp -ItemType Directory -Force | Out-Null
@(
"DEV_DRIVE=$Drive"
"TMP=$Tmp"
"TEMP=$Tmp"
) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append