Add a single place to initialize Flipper utilitary folders
Summary: We have several folders Flipper uses that sometimes we forget to create before Flipper starts. With this diff we have a single place to initialise the necessary folder structure. Reviewed By: lblasa Differential Revision: D37036601 fbshipit-source-id: f945f2bfdfc6be24ba87bd4b13c7fcef3fd74451
This commit is contained in:
committed by
Facebook GitHub Bot
parent
60f9a5e8de
commit
d987e36c62
@@ -16,15 +16,15 @@ import {
|
||||
import path from 'path';
|
||||
import tmp, {FileOptions} from 'tmp';
|
||||
import {reportPlatformFailures} from 'flipper-common';
|
||||
import os from 'os';
|
||||
import {isTest} from 'flipper-common';
|
||||
import {flipperDataFolder} from './paths';
|
||||
|
||||
const tmpFile = promisify(tmp.file) as (
|
||||
options?: FileOptions,
|
||||
) => Promise<string>;
|
||||
|
||||
const getFilePath = (fileName: string): string => {
|
||||
return path.resolve(os.homedir(), '.flipper', 'certs', fileName);
|
||||
return path.resolve(flipperDataFolder, 'certs', fileName);
|
||||
};
|
||||
|
||||
// Desktop file paths
|
||||
|
||||
Reference in New Issue
Block a user