summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-02-20 14:44:08 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-02-20 17:48:28 +0100
commita66156cb6ca007a9321ac91a8007cfc8faf6ec39 (patch)
tree664160965fad166c53ef82392f897386d2b9cae0
parent8e4d6c7a6f4717a88220c40f28065fe4dd9e8e54 (diff)
downloadmullvadvpn-a66156cb6ca007a9321ac91a8007cfc8faf6ec39.tar.xz
mullvadvpn-a66156cb6ca007a9321ac91a8007cfc8faf6ec39.zip
Suppress warnings related to require()
-rw-r--r--app/lib/rpc-file-security.js1
-rw-r--r--app/main.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/rpc-file-security.js b/app/lib/rpc-file-security.js
index da777d9b78..22dedb00be 100644
--- a/app/lib/rpc-file-security.js
+++ b/app/lib/rpc-file-security.js
@@ -24,6 +24,7 @@ function isOwnedAndOnlyWritableByRoot(path: string): boolean {
}
function isOwnedByLocalSystem(path: string): boolean {
+ // $FlowFixMe: this module is only available on Windows
const winsec = require('windows-security');
const ownerSid = winsec.getFileOwnerSid(path, null);
const isWellKnownSid = winsec.isWellKnownSid(ownerSid, winsec.WellKnownSid.LocalSystemSid);
diff --git a/app/main.js b/app/main.js
index 1fbde604d3..2b056680c9 100644
--- a/app/main.js
+++ b/app/main.js
@@ -420,6 +420,7 @@ const appDelegate = {
// setup NSEvent monitor to fix inconsistent window.blur
// see https://github.com/electron/electron/issues/8689
+ // $FlowFixMe: this module is only available on macOS
const { NSEventMonitor, NSEventMask } = require('nseventmonitor');
const trayIconManager = new TrayIconManager(tray, 'unsecured');
const macEventMonitor = new NSEventMonitor();