mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 02:24:18 +00:00
fix cached manifest fail
This commit is contained in:
parent
29bb3bdbfe
commit
edff94294a
@ -39,7 +39,11 @@ export default async function lastOperationRetry(pkg_id) {
|
||||
break
|
||||
case "failed": {
|
||||
// copy pkg.local_manifest to cache after uninstall
|
||||
const cachedManifest = path.join(Vars.cache_path, path.basename(pkg.local_manifest))
|
||||
const cachedManifest = path.join(Vars.cache_path, `${Date.now()}${path.basename(pkg.local_manifest)}`)
|
||||
|
||||
if (!fs.existsSync(Vars.cache_path)) {
|
||||
await fs.promises.mkdir(Vars.cache_path, { recursive: true })
|
||||
}
|
||||
|
||||
await fs.promises.copyFile(pkg.local_manifest, cachedManifest)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user