1
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2025-07-10 21:00:46 +00:00

Add initial minimatch support

This commit is contained in:
Ethan Dennis 2020-03-05 09:15:35 -08:00
parent 84cead4a82
commit 1e233443e8
No known key found for this signature in database
GPG key ID: 32E74B75DB4065DD
14 changed files with 202 additions and 108 deletions

View file

@ -4,6 +4,7 @@ import * as cacheHttpClient from "./cacheHttpClient";
import { Events, Inputs, State } from "./constants";
import { createTar } from "./tar";
import * as utils from "./utils/actionUtils";
import * as pathUtils from "./utils/pathUtils";
async function run(): Promise<void> {
try {
@ -43,11 +44,12 @@ async function run(): Promise<void> {
return;
}
core.debug(`Cache ID: ${cacheId}`);
const cachePaths = core
.getInput(Inputs.Path)
.split("\n")
.filter(x => x !== "")
.map(x => utils.resolvePath(x));
const cachePaths = pathUtils.expandPaths(
core
.getInput(Inputs.Path)
.split("\n")
.filter(x => x !== "")
);
core.debug("Cache Paths:");
core.debug(`${JSON.stringify(cachePaths)}`);