diff --git a/src/init.tsx b/src/init.tsx index 13bd7fe47..3f4253218 100644 --- a/src/init.tsx +++ b/src/init.tsx @@ -24,7 +24,7 @@ import {stateSanitizer} from './utils/reduxDevToolsConfig'; import {initLauncherHooks} from './utils/launcher'; import initCrashReporter from './utils/electronCrashReporter'; import fbConfig from './fb-stubs/config'; -import {isFBEmployee} from './utils/fbEmployee.js'; +import {isFBEmployee} from './utils/fbEmployee'; import WarningEmployee from './chrome/WarningEmployee'; import React from 'react'; diff --git a/src/utils/fbEmployee.js b/src/utils/fbEmployee.tsx similarity index 79% rename from src/utils/fbEmployee.js rename to src/utils/fbEmployee.tsx index 4641d34df..8a0114f62 100644 --- a/src/utils/fbEmployee.js +++ b/src/utils/fbEmployee.tsx @@ -11,14 +11,14 @@ const exec = util.promisify(require('child_process').exec); const cmd = 'klist --json'; const endWith = '@THEFACEBOOK.COM'; -export function isFBEmployee(): Promise { +export async function isFBEmployee(): Promise { return exec(cmd).then( - (stdobj: {stderr: string, stdout: string}) => { + (stdobj: {stderr: string; stdout: string}) => { const principal = String(JSON.parse(stdobj.stdout).principal); return principal.endsWith(endWith); }, - err => { + (_err: Error) => { return false; }, );