Skip to content

Commit 2cac6b3

Browse files
committed
Revert "use state to transmit enabled input"
This reverts commit 735686b.
1 parent 7a06e98 commit 2cac6b3

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

lib/cache-save.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as cache from "@actions/cache";
44
import { getCacheDirectory, State } from "./cache-utils";
55

66
async function saveCache() {
7-
const enableCache = JSON.parse(core.getState(State.CacheEnabledKey));
7+
const enableCache = core.getBooleanInput("cache");
88

99
if (!enableCache) {
1010
core.info(`Caching disabled, not saving cache.`);

lib/cache-utils.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import fs from "fs/promises";
99
export const State = {
1010
CachePrimaryKey: "primary_key",
1111
CacheMatchedKey: "matched_key",
12-
CacheEnabledKey: "cache_enabled",
1312
};
1413

1514
export async function getCacheDirectory() {

lib/main.js

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
import { downloadScarb } from "./download";
1010
import { getOsTriplet } from "./platform";
1111
import { restoreCache } from "./cache-restore";
12-
import { State } from "./cache-utils";
1312

1413
export default async function main() {
1514
try {
@@ -50,7 +49,6 @@ export default async function main() {
5049

5150
core.setOutput("scarb-version", await getFullVersionFromScarb());
5251

53-
core.saveState(State.CacheEnabledKey, enableCache);
5452
if (enableCache) {
5553
await restoreCache(scarbLockPathInput).catch((e) => {
5654
core.error(

0 commit comments

Comments
 (0)