Remove remaining Node imports from core
Summary: Removed remaining path / fs imports from Flipper core. `expand-tide` needed replacement too, but noticed that it never actually rewrites paths since all use cases were already using absolute paths, so removed it instead. Reviewed By: aigoncharov Differential Revision: D33017654 fbshipit-source-id: e12f66ef68b5f9e4279411c94445a2fb87249e9a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d95b15094f
commit
accef856fc
@@ -7,15 +7,14 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import util from 'util';
|
||||
import {exec as execImport} from 'child_process';
|
||||
import {getFlipperLib} from 'flipper-plugin';
|
||||
|
||||
const cmd = 'klist --json';
|
||||
const endWith = '@THEFACEBOOK.COM';
|
||||
|
||||
export async function isFBEmployee(): Promise<boolean> {
|
||||
return util
|
||||
.promisify(execImport)(cmd)
|
||||
return getFlipperLib()
|
||||
.remoteServerContext.childProcess.exec(cmd)
|
||||
.then(
|
||||
(stdobj: {stderr: string; stdout: string}) => {
|
||||
const principal = String(JSON.parse(stdobj.stdout).principal);
|
||||
|
||||
Reference in New Issue
Block a user