Improve string split

This commit is contained in:
Dave Hadka committed 2020-06-02 17:07:33 -05:00
1 parent e561127c3e
commit d60d2bef10
8 files changed
+95 -27

No files matched your search

+4 -9
View File
@@ -19,15 +19,10 @@ async function run(): Promise<void> {
const primaryKey = core.getInput(Inputs.Key, { required: true });
core.saveState(State.CachePrimaryKey, primaryKey);
const restoreKeys = core
.getInput(Inputs.RestoreKeys)
.split("\n")
.filter(x => x !== "");
const cachePaths = core
.getInput(Inputs.Path, { required: true })
.split("\n")
.filter(x => x !== "");
const restoreKeys = utils.getInputAsArray(Inputs.RestoreKeys);
const cachePaths = utils.getInputAsArray(Inputs.Path, {
required: true
});
try {
const cacheKey = await cache.restoreCache(