From 8a34f0c129649308e0da49438dec5f6872877194 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 24 Jan 2025 09:28:47 -0600 Subject: [PATCH] Only move the `.cargo` directory if it exists 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 9a5350742211..e0e2a765bb00 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)" `