Skip to content

Commit

Permalink
react-sync: Ignore update notices from npm
Browse files Browse the repository at this point in the history
`npm view` prints a notice when a new update is available
to `stderr` tricking us into thinking there was an error.
```
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g npm@10.9.0
npm notice
```

Running with `--silent` avoids these unrelated warnings (see npm/npm#2040 (comment)).
  • Loading branch information
eps1lon committed Oct 23, 2024
1 parent 51d6e76 commit cc5916c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/sync-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async function main() {
) {
const { stdout, stderr } = await execa(
'npm',
['view', 'react@canary', 'version'],
['--silent', 'view', 'react@canary', 'version'],
{
// Avoid "Usage Error: This project is configured to use pnpm".
cwd: '/tmp',
Expand Down

0 comments on commit cc5916c

Please sign in to comment.