From 64668e22dd45bf14a17a237b461f4bf9e9912723 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 17 Dec 2019 15:11:47 -0500 Subject: [PATCH] Move hashsum after tar creation --- dist/save/index.js | 2 +- src/save.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/save/index.js b/dist/save/index.js index cf0ce25..6d3d845 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -2980,7 +2980,6 @@ function run() { core.debug(`Cache Path: ${cachePath}`); const archivePath = path.join(yield utils.createTempDirectory(), "cache.tgz"); core.debug(`Archive Path: ${archivePath}`); - yield exec_1.exec(`md5sum`, [archivePath]); // http://man7.org/linux/man-pages/man1/tar.1.html // tar [-options] [files or directories which to add into archive] const IS_WINDOWS = process.platform === "win32"; @@ -3005,6 +3004,7 @@ function run() { utils.logWarning(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024 * 1024))} GB (${archiveFileSize} B) is over the 2GB limit, not saving cache.`); return; } + yield exec_1.exec(`md5sum`, [archivePath]); core.debug("Saving Cache"); yield cacheHttpClient.saveCache(cacheId, archivePath); } diff --git a/src/save.ts b/src/save.ts index 88df4e6..78f5733 100644 --- a/src/save.ts +++ b/src/save.ts @@ -52,7 +52,6 @@ async function run(): Promise { "cache.tgz" ); core.debug(`Archive Path: ${archivePath}`); - await exec(`md5sum`, [archivePath]); // http://man7.org/linux/man-pages/man1/tar.1.html // tar [-options] [files or directories which to add into archive] @@ -85,6 +84,7 @@ async function run(): Promise { return; } + await exec(`md5sum`, [archivePath]); core.debug("Saving Cache"); await cacheHttpClient.saveCache(cacheId, archivePath); } catch (error) {