diff --git a/dist/restore/index.js b/dist/restore/index.js index ef32a83..aaa23a8 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -88363,7 +88363,7 @@ class CacheConfig { try { const content = await promises_default().readFile(cargo_lock, { encoding: "utf8" }); const parsed = parse(content); - if (parsed.version !== 3 || !("package" in parsed)) { + if ((parsed.version !== 3 && parsed.version !== 4) || !("package" in parsed)) { // Fallback to caching them as regular file since this action // can only handle Cargo.lock format version 3 lib_core.warning('Unsupported Cargo.lock format, fallback to caching entire file'); diff --git a/dist/save/index.js b/dist/save/index.js index f50bde9..046bfae 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -88363,7 +88363,7 @@ class CacheConfig { try { const content = await promises_default().readFile(cargo_lock, { encoding: "utf8" }); const parsed = parse(content); - if (parsed.version !== 3 || !("package" in parsed)) { + if ((parsed.version !== 3 && parsed.version !== 4) || !("package" in parsed)) { // Fallback to caching them as regular file since this action // can only handle Cargo.lock format version 3 core.warning('Unsupported Cargo.lock format, fallback to caching entire file'); diff --git a/src/config.ts b/src/config.ts index 2b24788..15ca1cf 100644 --- a/src/config.ts +++ b/src/config.ts @@ -197,7 +197,7 @@ export class CacheConfig { const content = await fs_promises.readFile(cargo_lock, { encoding: "utf8" }); const parsed = toml.parse(content); - if (parsed.version !== 3 || !("package" in parsed)) { + if ((parsed.version !== 3 && parsed.version !== 4) || !("package" in parsed)) { // Fallback to caching them as regular file since this action // can only handle Cargo.lock format version 3 core.warning('Unsupported Cargo.lock format, fallback to caching entire file');