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

Fix discovering extensions with with scopes (#6221)

This commit is contained in:
Sebastian Malton 2022-09-09 16:05:16 -04:00 committed by GitHub
parent 2d6239123b
commit 23cb231c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,7 +363,8 @@ export class ExtensionDiscovery {
const id = this.getInstalledManifestPath(manifest.name);
const isEnabled = this.dependencies.extensionsStore.isEnabled({ id, isBundled });
const extensionDir = path.dirname(manifestPath);
const npmPackage = path.join(extensionDir, `${manifest.name}-${manifest.version}.tgz`);
const packedName = manifest.name.replaceAll("@", "").replaceAll("/", "-");
const npmPackage = path.join(extensionDir, `${packedName}-${manifest.version}.tgz`);
const absolutePath = (isProduction && await this.dependencies.pathExists(npmPackage)) ? npmPackage : extensionDir;
const isCompatible = isBundled || this.dependencies.isCompatibleExtension(manifest);