mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix all-or-nothing when initially loading extensions
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
fe4a56ba59
commit
e52ba62e0e
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
import { watch } from "chokidar";
|
||||
import { ipcRenderer } from "electron";
|
||||
import { dialog, ipcRenderer } from "electron";
|
||||
import { EventEmitter } from "events";
|
||||
import fse from "fs-extra";
|
||||
import { observable, reaction, when, makeObservable } from "mobx";
|
||||
@ -393,7 +393,14 @@ export class ExtensionDiscovery extends Singleton {
|
||||
|
||||
for (const extension of userExtensions) {
|
||||
if ((await fse.pathExists(extension.manifestPath)) === false) {
|
||||
await this.installPackage(extension.absolutePath);
|
||||
try {
|
||||
await this.installPackage(extension.absolutePath);
|
||||
} catch (error) {
|
||||
const message = error.message || error?.toString() || "unknown error";
|
||||
const { name, version } = extension.manifest;
|
||||
|
||||
dialog.showErrorBox("Lens Extension Install Failure", `Failed to install user extension ${name}@${version}: ${message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user