Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Feb 10, 2024
1 parent d398536 commit 9b90e04
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ExecStack = void 0;
const fs = __importStar(__nccwpck_require__(7147));
const exec = __importStar(__nccwpck_require__(1514));
class ExecStack {
stackArguments;
Expand All @@ -53,6 +54,7 @@ class ExecStack {
stdout += data.toString();
},
},
outStream: fs.createWriteStream(process.platform === "win32" ? "nul" : "/dev/null"),
};
await this.exec(args, options);
return stdout;
Expand Down Expand Up @@ -285,7 +287,7 @@ async function run() {
hashes.package,
]);
const cachePaths = [stackPath["stack-root"], stackPath.programs].concat(stackWorks);
await (0, with_cache_1.withCache)(cachePaths, cacheKeys, dependencies(stack, inputs), {
await (0, with_cache_1.withCache)(cachePaths, cacheKeys, async () => await dependencies(stack, inputs), {
...with_cache_1.DEFAULT_CACHE_OPTIONS,
skipOnHit: !inputs.cacheSaveAlways,
});
Expand All @@ -297,7 +299,7 @@ async function run() {
hashes.package,
hashes.sources,
]);
await (0, with_cache_1.withCache)(stackWorks, cacheKeys, build(stack, inputs), {
await (0, with_cache_1.withCache)(stackWorks, cacheKeys, async () => await build(stack, inputs), {
...with_cache_1.DEFAULT_CACHE_OPTIONS,
skipOnHit: !inputs.cacheSaveAlways,
});
Expand Down Expand Up @@ -458,7 +460,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);
Expand Down

0 comments on commit 9b90e04

Please sign in to comment.