mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
Apply Prettier (#1202)
This commit is contained in:
48
src/entry.ts
48
src/entry.ts
@@ -1,4 +1,4 @@
|
||||
import { NativeMessagingProxy } from './proxy/native-messaging-proxy';
|
||||
import { NativeMessagingProxy } from "./proxy/native-messaging-proxy";
|
||||
|
||||
// We need to import the other dependencies using `require` since `import` will
|
||||
// generate `Error: Cannot find module 'electron'`. The cause of this error is
|
||||
@@ -6,28 +6,30 @@ import { NativeMessagingProxy } from './proxy/native-messaging-proxy';
|
||||
// which removes the electron module. This flag is needed for stdin/out to work
|
||||
// properly on Windows.
|
||||
|
||||
if (process.argv.some(arg => arg.indexOf('chrome-extension://') !== -1 || arg.indexOf('{') !== -1)) {
|
||||
if (process.platform === 'darwin') {
|
||||
// tslint:disable-next-line
|
||||
const app = require('electron').app;
|
||||
|
||||
app.on('ready', () => {
|
||||
app.dock.hide();
|
||||
});
|
||||
}
|
||||
|
||||
process.stdout.on('error', e => {
|
||||
if (e.code === 'EPIPE') {
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
|
||||
const proxy = new NativeMessagingProxy();
|
||||
proxy.run();
|
||||
} else {
|
||||
if (
|
||||
process.argv.some((arg) => arg.indexOf("chrome-extension://") !== -1 || arg.indexOf("{") !== -1)
|
||||
) {
|
||||
if (process.platform === "darwin") {
|
||||
// tslint:disable-next-line
|
||||
const Main = require('./main').Main;
|
||||
const app = require("electron").app;
|
||||
|
||||
const main = new Main();
|
||||
main.bootstrap();
|
||||
app.on("ready", () => {
|
||||
app.dock.hide();
|
||||
});
|
||||
}
|
||||
|
||||
process.stdout.on("error", (e) => {
|
||||
if (e.code === "EPIPE") {
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
|
||||
const proxy = new NativeMessagingProxy();
|
||||
proxy.run();
|
||||
} else {
|
||||
// tslint:disable-next-line
|
||||
const Main = require("./main").Main;
|
||||
|
||||
const main = new Main();
|
||||
main.bootstrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user