Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbhmr authored Jan 31, 2024
1 parent 2d2c92e commit c6311d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ core.debug(`Resolved version: v${version}`);
if (!version) throw new DOMException(`${versionRaw} resolved to ${version}`);

const workflowCache = core.getBooleanInput("cache");
const primaryKey = `hayagriva-${version}`;

let found = tc.find("hayagriva", version);
let cacheHit = !!found;
Expand All @@ -46,8 +47,6 @@ if (!found) {

install_hayagriva: {
if (workflowCache) {
const primaryKey = `hayagriva-${version}`;
core.saveState("cache-key", primaryKey);
const hitKey = await cache.restoreCache([cacheDir], primaryKey);
if (hitKey) {
found = cacheDir;
Expand All @@ -61,7 +60,6 @@ if (!found) {
})`cargo binstall hayagriva --version ${version} --force -y --install-path ${cacheDir}`;

if (workflowCache) {
const primaryKey = core.getState("cache-key");
await cache.saveCache([cacheDir], primaryKey);
}
}
Expand Down

0 comments on commit c6311d7

Please sign in to comment.