From 1ef47aa1d51837931f89602b3277d83389e3425d Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 24 Jan 2025 09:39:29 -0600 Subject: [PATCH] Only move the `.cargo` directory if it exists (#10938) which it usually does... but on some runners it can be missing now? --- .github/workflows/setup-dev-drive.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/setup-dev-drive.ps1 b/.github/workflows/setup-dev-drive.ps1 index 9a5350742..e0e2a765b 100644 --- a/.github/workflows/setup-dev-drive.ps1 +++ b/.github/workflows/setup-dev-drive.ps1 @@ -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)" `