Set the right environment info for headless builds

Summary: The isHeadlessBuild flag was not properly set.

Reviewed By: antonk52

Differential Revision: D45728435

fbshipit-source-id: 3616c4358114d4f3d96372766dabf48b27b44333
This commit is contained in:
Lorenzo Blasa
2023-05-10 04:35:17 -07:00
committed by Facebook GitHub Bot
parent 1086e05ba0
commit b94f6b6152
3 changed files with 8 additions and 1 deletions

View File

@@ -182,6 +182,7 @@ async function getFlipperServer(
false,
keytar,
'embedded',
environmentInfo.isHeadlessBuild,
);
const companionEnv = await initCompanionEnv(server);

View File

@@ -39,6 +39,7 @@ export async function startFlipperServer(
enableLauncherSettings: boolean,
keytarModule: KeytarModule,
type: FlipperServerType,
isHeadless: boolean,
): Promise<FlipperServerImpl> {
const execPath = process.execPath;
const appPath = rootDir;
@@ -53,7 +54,11 @@ export async function startFlipperServer(
desktopPath = os.homedir();
}
const environmentInfo = await getEnvironmentInfo(appPath, isProduction, true);
const environmentInfo = await getEnvironmentInfo(
appPath,
isProduction,
isHeadless,
);
return new FlipperServerImpl(
{

View File

@@ -117,6 +117,7 @@ async function start() {
argv.launcherSettings,
keytar,
'external',
true,
);
exitHook(async () => {