Skip to content

Commit

Permalink
fix: correctly log error output when building (#698)
Browse files Browse the repository at this point in the history
<!-- Please provide enough information so that others can review your
pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Summary

If an error occurs, it is not printed in the CLI.

* as-is:
<img width="611" alt="image"
src="https://github.com/user-attachments/assets/f535b6d7-b4bd-4274-868e-30640ca1f653">

* to-be:
<img width="626" alt="image"
src="https://github.com/user-attachments/assets/8bd6d0c5-da74-4230-bb8f-02adf3bb10b4">




<!-- What existing problem does the pull request solve? Can you solve
the issue with a different approach? -->

### Test plan
1. `react-native-config.js` file: 
```js
test // That code will cause an error.
```
2. yarn prepare

<!-- List the steps with which we can test this change. Provide
screenshots if this changes anything visual. -->
  • Loading branch information
gronxb authored Dec 4, 2024
1 parent a9f2ede commit 78f16fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native-builder-bob/src/utils/runRNCCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { spawn } from './spawn';
export async function runRNCCli(
args: string[],
options: SpawnOptions = {
stdio: 'ignore',
stdio: ['ignore', 'ignore', 'pipe'],
}
) {
return await spawn('npx', ['@react-native-community/cli', ...args], options);
Expand Down

0 comments on commit 78f16fc

Please sign in to comment.