diff --git a/private/react-native-fantom/runner/utils.js b/private/react-native-fantom/runner/utils.js index d7a75e8e0e5..3c23536eff0 100644 --- a/private/react-native-fantom/runner/utils.js +++ b/private/react-native-fantom/runner/utils.js @@ -268,16 +268,18 @@ export function getDebugInfoFromCommandResult( ? 'succeeded' : `failed (status code: ${commandResult.status ?? '(empty)'}${maybeSignal})`; + const commandLine = `Command ${resultByStatus}: ${commandResult.originalCommand}`; + const stdout = commandResult.stdout; + const stderr = commandResult.stderr; + const logLines = [ - `Command ${resultByStatus}: ${commandResult.originalCommand}`, + commandLine, '', 'stdout:', - // $FlowExpectedError[sketchy-null-string] - commandResult.stdout || '(empty)', + stdout == null || stdout === '' ? '(empty)' : stdout, '', 'stderr:', - // $FlowExpectedError[sketchy-null-string] - commandResult.stderr || '(empty)', + stderr == null || stderr === '' ? '(empty)' : stderr, ]; if (commandResult.error) {