From ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 Mon Sep 17 00:00:00 2001 From: Brendan Early Date: Thu, 12 Jan 2023 23:07:29 -0600 Subject: [PATCH] Add os to default cache key Fixes Error when run on ubuntu #30 --- dist/index.js | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index f7756f3..365b165 100644 --- a/dist/index.js +++ b/dist/index.js @@ -64,7 +64,7 @@ function run() { if (emArgs.version !== "latest" && emArgs.version !== "tot" && emArgs.noCache === "false" && !emArgs.actionsCacheFolder) { emsdkFolder = yield tc.find('emsdk', emArgs.version, os.arch()); } - const cacheKey = `${emArgs.version}-${os.arch()}-master`; + const cacheKey = `${emArgs.version}-${os.platform()}-${os.arch()}-master`; if (emArgs.actionsCacheFolder && process.env.GITHUB_WORKSPACE) { const fullCachePath = path.join(process.env.GITHUB_WORKSPACE, emArgs.actionsCacheFolder); try { diff --git a/src/main.ts b/src/main.ts index 35f06f9..29083c4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,7 +26,7 @@ async function run() { emsdkFolder = await tc.find('emsdk', emArgs.version, os.arch()); } - const cacheKey = `${emArgs.version}-${os.arch()}-master`; + const cacheKey = `${emArgs.version}-${ os.platform() }-${os.arch()}-master`; if (emArgs.actionsCacheFolder && process.env.GITHUB_WORKSPACE) { const fullCachePath = path.join(process.env.GITHUB_WORKSPACE, emArgs.actionsCacheFolder); try {