Only move the .cargo directory if it exists (#10938)

which it usually does... but on some runners it can be missing now?
This commit is contained in:
Zanie Blue
2025-01-24 09:39:29 -06:00
committed by GitHub
parent eeab865194
commit 1ef47aa1d5
+3 -1
View File
@@ -47,7 +47,9 @@ New-Item $Tmp -ItemType Directory
# Move Cargo to the dev drive
New-Item -Path "$($Drive)/.cargo/bin" -ItemType Directory -Force
Copy-Item -Path "C:/Users/runneradmin/.cargo/*" -Destination "$($Drive)/.cargo/" -Recurse -Force
if (Test-Path "C:/Users/runneradmin/.cargo") {
Copy-Item -Path "C:/Users/runneradmin/.cargo/*" -Destination "$($Drive)/.cargo/" -Recurse -Force
}
Write-Output `
"DEV_DRIVE=$($Drive)" `