mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add catching of error while starting main application
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8217ad4ba8
commit
8410a82596
@ -7,6 +7,7 @@
|
||||
|
||||
import * as Mobx from "mobx";
|
||||
import { spawn } from "node-pty";
|
||||
import process from "process";
|
||||
import * as LensExtensionsCommonApi from "../extensions/common-api";
|
||||
import * as LensExtensionsMainApi from "../extensions/main-api";
|
||||
import { getDi } from "./getDi";
|
||||
@ -14,7 +15,14 @@ import startMainApplicationInjectable from "./start-main-application/start-main-
|
||||
|
||||
const di = getDi();
|
||||
|
||||
void di.inject(startMainApplicationInjectable);
|
||||
(async () => {
|
||||
try {
|
||||
await di.inject(startMainApplicationInjectable);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
|
||||
/**
|
||||
* Exports for virtual package "@k8slens/extensions" for main-process.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user