1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove broken symlink on manual uninstall during runtime

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti 2020-12-09 11:34:28 +02:00
parent d0ff19b7e9
commit 4f676d4e86

View File

@ -202,6 +202,9 @@ export class ExtensionDiscovery {
.find(([, extensionFolder]) => filePath === extensionFolder)?.[0];
if (extensionName !== undefined) {
// If the extension is deleted manually while the application is running, also remove the symlink
await this.removeSymlinkByPackageName(extensionName);
delete this.packagesJson.dependencies[extensionName];
// Reinstall dependencies to remove the extension from package.json