renombrar a cacheDir
This commit is contained in:
parent
1f410fc847
commit
879a5f1433
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ type RegistrySecret = string;
|
|||
const getToken = memoizeDownloader(_getToken);
|
||||
let squashfsDownloads = new Map<string, Promise<string>>();
|
||||
|
||||
const tmpDir = "cache/";
|
||||
const cacheDir = "cache/";
|
||||
// {
|
||||
// const image = "gitea.nulo.in/nulo/zulip-checkin-cyborg";
|
||||
// const tag = "latest";
|
||||
|
@ -27,7 +27,7 @@ export function parseImageRef(ref: string): { image: string; tag: string } {
|
|||
}
|
||||
|
||||
export async function downloadImage(image: string, tag: string) {
|
||||
await mkdir(tmpDir, { recursive: true });
|
||||
await mkdir(cacheDir, { recursive: true });
|
||||
const manifest = await getManifest(image, tag);
|
||||
|
||||
// sanity check
|
||||
|
@ -75,7 +75,7 @@ async function saveSquashfs(
|
|||
let p = squashfsDownloads.get(key);
|
||||
if (!p) {
|
||||
p = (async () => {
|
||||
const output = join(tmpDir, key);
|
||||
const output = join(cacheDir, key);
|
||||
try {
|
||||
await access(output);
|
||||
// ya está cacheado
|
||||
|
|
Loading…
Reference in a new issue