From 007dfd3ca83c8da09976877a0a620235b888f6b6 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Fri, 3 May 2024 11:56:21 -0700 Subject: [PATCH] Add another check. --- src/cargo.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cargo.ts b/src/cargo.ts index d8f3732..0b8c60c 100644 --- a/src/cargo.ts +++ b/src/cargo.ts @@ -174,6 +174,11 @@ export async function saveCache() { return true; }); + if (cachePaths.length === 0) { + core.info('No paths to cache, skipping save entirely'); + return; + } + await cleanCargoRegistry(); await cleanTargetProfile();