mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Don't error on close directly
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
4c5626cd84
commit
f7ba996f7a
@ -36,13 +36,8 @@ async function getMainWindow(app: ElectronApplication, timeout = 50_000): Promis
|
||||
app.on("window", onWindow);
|
||||
cleanup.push(() => app.off("window", onWindow));
|
||||
|
||||
const onClose = () => {
|
||||
cleanup();
|
||||
reject(new Error("App has unnexpectedly closed"));
|
||||
};
|
||||
|
||||
app.on("close", onClose);
|
||||
cleanup.push(() => app.off("close", onClose));
|
||||
app.on("close", cleanup);
|
||||
cleanup.push(() => app.off("close", cleanup));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const stdout = app.process().stdout!;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user