From db045a3b212993c254a48992d11442ea8a19ca66 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 30 May 2022 03:44:28 -0700 Subject: [PATCH] Send isHeadlessBuild flag in error reporting Summary: Andrey's diff already ensures that we send the flag, this also adds it to the info string which makes it more visible. Reviewed By: lblasa Differential Revision: D36699070 fbshipit-source-id: 905eded9612b19ecaa35a841ec240af002e11611 --- desktop/flipper-ui-core/src/utils/info.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-ui-core/src/utils/info.tsx b/desktop/flipper-ui-core/src/utils/info.tsx index c746cd472..f219b38b7 100644 --- a/desktop/flipper-ui-core/src/utils/info.tsx +++ b/desktop/flipper-ui-core/src/utils/info.tsx @@ -18,6 +18,7 @@ import {getRenderHostInstance} from '../RenderHost'; type PlatformInfo = { arch: string; platform: string; + isHeadlessBuild: boolean; unixname: string; versions: { [key: string]: string | undefined; @@ -85,6 +86,7 @@ export function getInfo(): Info { platformInfo = { arch: envInfo.os.arch, platform: envInfo.os.platform, + isHeadlessBuild: envInfo.isHeadlessBuild, unixname: envInfo.os.unixname, versions: envInfo.versions, }; @@ -101,7 +103,9 @@ export function getAppVersion(): string { export function stringifyInfo(info: Info): string { const lines = [ - `Platform: ${info.platform} ${info.arch}`, + `Platform: ${info.platform} ${info.arch} (${ + info.isHeadlessBuild ? 'headless' : 'desktop' + })`, `Unixname: ${info.unixname}`, `Versions:`, ];