diff --git a/dist/index.js b/dist/index.js index 82f3eff..47f59fd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -245,9 +245,6 @@ const with_cache_1 = __nccwpck_require__(4739); function setOutputs(stackQuery, stackPath) { core.setOutput("compiler", stackQuery.compiler.actual); core.setOutput("compiler-version", stackQuery.compiler.actual.replace(/^ghc-/, "")); - for (const k in stackPath) { - core.setOutput(k, stackPath[k]); - } } async function dependencies(stack, inputs) { await stack.exec(["setup"].concat(inputs.stackSetupArguments)); @@ -280,32 +277,32 @@ async function run() { const stackWorks = (0, parse_stack_query_1.getLocalStackWorks)(stackQuery, [stackWork]); core.info(`Found .stack-works:\n - ${stackWorks.join("\n - ")}`); const hashes = await (0, hash_project_1.hashProject)(inputs.stackYaml); - core.group("Dependencies", async () => { + await core.group("Dependencies", async () => { const cacheKeys = (0, get_cache_keys_1.getCacheKeys)([ inputs.cachePrefix("stack-deps", stackQuery.compiler.actual), hashes.snapshot, hashes.package, ]); const cachePaths = [stackPath["stack-root"], stackPath.programs].concat(stackWorks); - await (0, with_cache_1.withCache)(cachePaths, cacheKeys, async () => await dependencies(stack, inputs), { + await (0, with_cache_1.withCache)(cachePaths, cacheKeys, dependencies(stack, inputs), { ...with_cache_1.DEFAULT_CACHE_OPTIONS, skipOnHit: !inputs.cacheSaveAlways, }); }); - core.group("Build", async () => { + await core.group("Build", async () => { const cacheKeys = (0, get_cache_keys_1.getCacheKeys)([ inputs.cachePrefix("stack-deps", stackQuery.compiler.actual), hashes.snapshot, hashes.package, hashes.sources, ]); - await (0, with_cache_1.withCache)(stackWorks, cacheKeys, async () => await build(stack, inputs), { + await (0, with_cache_1.withCache)(stackWorks, cacheKeys, build(stack, inputs), { ...with_cache_1.DEFAULT_CACHE_OPTIONS, skipOnHit: !inputs.cacheSaveAlways, }); }); if (inputs.test) { - core.group("Test", async () => await test(stack, inputs)); + await core.group("Test", async () => await test(stack, inputs)); } } catch (error) { @@ -460,7 +457,7 @@ async function withCache(paths, keys, act, options = exports.DEFAULT_CACHE_OPTIO return; } try { - return await act(); + return await act; } finally { await cacheDelegate.saveCache(paths, keys.primaryKey);