From f36a372bec8cf56fb169ada2c523d95c022e1df9 Mon Sep 17 00:00:00 2001 From: Anton Strogonoff Date: Mon, 29 Nov 2021 03:03:28 +0100 Subject: [PATCH] fix(populateCache): let download() cache blobs now --- src/populateCache.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/populateCache.ts b/src/populateCache.ts index 86c7316..347368f 100644 --- a/src/populateCache.ts +++ b/src/populateCache.ts @@ -1,10 +1,9 @@ -import path from 'path'; import fs from 'fs/promises'; import git from 'isomorphic-git'; import http from 'isomorphic-git/http/node'; -import { isVacantAndWriteable, isWriteable, pointsToLFS } from './util'; +import { isVacantAndWriteable, pointsToLFS } from './util'; import downloadBlobFromPointer from './download'; import { readPointer } from "./pointers"; @@ -64,12 +63,7 @@ export default async function populateCache(workDir: string, ref: string = 'HEAD { http, url: remoteURL }, pointer); - // Write LFS cache for this object, if cache path is still accessible. - if (await isWriteable(pointer.objectPath) === false) - return; - await fs.mkdir(path.dirname(pointer.objectPath), { recursive: true }); - await fs.writeFile(pointer.objectPath, content); } } }