fix prune packages

This commit is contained in:
neil molina 2023-04-07 17:17:28 +08:00
parent 0246c2577a
commit 517fbfc650
2 changed files with 4 additions and 3 deletions

View file

@ -163,8 +163,9 @@ export async function updatePackageInstalledList(list: InstalledPackage[]) {
export async function deletePackageFolder(fullName, version) {
try {
const foldPath = path.join(getTeaPath(), fullName, version);
await fs.rmSync(foldPath, { recursive: true, force: true });
const foldPath = path.join(getTeaPath(), fullName, `v${version}`);
console.log(foldPath);
await fs.rmdirSync(foldPath, { recursive: true });
} catch (error) {
log.error(error);
}

View file

@ -1,6 +1,6 @@
{
"name": "tea",
"version": "0.0.26",
"version": "0.0.27",
"private": true,
"description": "tea gui app",
"author": "tea.xyz",