Skip to content

Commit 63069e3

Browse files
committed
update code
1 parent 15457da commit 63069e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dist/restore/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65287,11 +65287,12 @@ async function restore(ccacheVariant) {
6528765287
const inputs = {
6528865288
primaryKey: lib_core.getInput("key"),
6528965289
// https://github.com/actions/cache/blob/73cb7e04054996a98d39095c0b7821a73fb5b3ea/src/utils/actionUtils.ts#L56
65290-
restoreKeys: lib_core.getInput("restore-keys").split("\n").map(s => s.trim()).filter(x => x !== "")
65290+
restoreKeys: lib_core.getInput("restore-keys").split("\n").map(s => s.trim()).filter(x => x !== ""),
65291+
appendTimestamp: lib_core.getInput("append-timestamp")
6529165292
};
6529265293
const keyPrefix = ccacheVariant + "-";
65293-
const primaryKey = inputs.primaryKey ? keyPrefix + inputs.primaryKey + "-" : keyPrefix;
65294-
const restoreKeys = inputs.restoreKeys.map(k => keyPrefix + k + "-");
65294+
const primaryKey = inputs.primaryKey ? keyPrefix + (inputs.appendTimestamp ? inputs.primaryKey + "-" : inputs.primaryKey) : keyPrefix;
65295+
const restoreKeys = inputs.restoreKeys.map(k => keyPrefix + k + (inputs.appendTimestamp ? "-" : ""));
6529565296
const paths = [cacheDir(ccacheVariant)];
6529665297
lib_core.saveState("primaryKey", primaryKey);
6529765298
const shouldRestore = lib_core.getBooleanInput("restore");

0 commit comments

Comments
 (0)