From 35e7b01815b7daf1ff699113e1bfef9b76a06ea5 Mon Sep 17 00:00:00 2001 From: axe312ger Date: Sun, 26 Sep 2021 13:04:02 +0200 Subject: [PATCH] fix: log mtime as creation date --- dist/restore/index.js | 2 +- dist/save/index.js | 2 +- src/cache.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index d60f212d5..814691d72 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -5284,7 +5284,7 @@ function restoreCache(paths, primaryKey, restoreKeys) { const cmd = `lz4 -d -v -c ${cachePath} | tar xf - -C ${baseDir}`; core.info([ `Restoring cache: ${cacheFile.name}`, - `Created: ${(_a = cacheFile.stats) === null || _a === void 0 ? void 0 : _a.birthtime}`, + `Created: ${(_a = cacheFile.stats) === null || _a === void 0 ? void 0 : _a.mtime}`, `Size: ${pretty_bytes_1.default(((_b = cacheFile.stats) === null || _b === void 0 ? void 0 : _b.size) || 0)}` ].join("\n")); const createCacheDirPromise = execAsync(cmd); diff --git a/dist/save/index.js b/dist/save/index.js index dca854e6d..240f3dd71 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -5374,7 +5374,7 @@ function restoreCache(paths, primaryKey, restoreKeys) { const cmd = `lz4 -d -v -c ${cachePath} | tar xf - -C ${baseDir}`; core.info([ `Restoring cache: ${cacheFile.name}`, - `Created: ${(_a = cacheFile.stats) === null || _a === void 0 ? void 0 : _a.birthtime}`, + `Created: ${(_a = cacheFile.stats) === null || _a === void 0 ? void 0 : _a.mtime}`, `Size: ${pretty_bytes_1.default(((_b = cacheFile.stats) === null || _b === void 0 ? void 0 : _b.size) || 0)}` ].join("\n")); const createCacheDirPromise = execAsync(cmd); diff --git a/src/cache.ts b/src/cache.ts index d93b2c13d..dd9c53365 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -187,7 +187,7 @@ export async function restoreCache( core.info( [ `Restoring cache: ${cacheFile.name}`, - `Created: ${cacheFile.stats?.birthtime}`, + `Created: ${cacheFile.stats?.mtime}`, `Size: ${prettyBytes(cacheFile.stats?.size || 0)}` ].join("\n") );