certificate provider
Summary: _typescript_ Reviewed By: passy Differential Revision: D17096517 fbshipit-source-id: a6e69e8b9a82fe76bb1de51a3a93182f35f40b3f
This commit is contained in:
committed by
Facebook Github Bot
parent
9970c50daf
commit
5868946818
@@ -10,12 +10,16 @@ import {promisify} from 'util';
|
||||
import {crashReporter, remote} from 'electron';
|
||||
import isProduction from '../utils/isProduction';
|
||||
import constants from '../fb-stubs/constants';
|
||||
import {tmpName} from 'tmp';
|
||||
import {tmpName as tmpNameCallback, TmpNameOptions} from 'tmp';
|
||||
import {resolve} from 'path';
|
||||
|
||||
const tmpName = promisify(tmpNameCallback) as (
|
||||
options?: TmpNameOptions,
|
||||
) => Promise<string>;
|
||||
|
||||
// Cross platform way to find the /tmp directory or equivalent.
|
||||
// The tempPath set should be persistent across app restarts.
|
||||
const tempPathPromise: Promise<string> = promisify(tmpName)({
|
||||
const tempPathPromise: Promise<string> = tmpName({
|
||||
template: '/tmp/tmp-XXXXXX',
|
||||
}).then(name => resolve(name, '..', 'flipper'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user