fix initialize cache_path

This commit is contained in:
SrGooglo 2024-04-03 01:26:34 +02:00
parent 9af9d38fe1
commit 98d4676d8e

View File

@ -11,11 +11,11 @@ export async function readManifest(manifest) {
const target = manifest?.remote_url ?? manifest const target = manifest?.remote_url ?? manifest
if (urlRegex.test(target)) { if (!fs.existsSync(Vars.cache_path)) {
if (!fs.existsSync(Vars.cache_path)) { fs.mkdirSync(Vars.cache_path, { recursive: true })
fs.mkdirSync(Vars.cache_path, { recursive: true }) }
}
if (urlRegex.test(target)) {
const { data: code } = await axios.get(target) const { data: code } = await axios.get(target)
const manifestChecksum = checksum(code, { algorithm: "md5" }) const manifestChecksum = checksum(code, { algorithm: "md5" })