Skip to content

Commit cc5916c

Browse files
committed
react-sync: Ignore update notices from npm
`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 [email protected] npm notice ``` Running with `--silent` avoids these unrelated warnings (see npm/npm#2040 (comment)).
1 parent 51d6e76 commit cc5916c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/sync-react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ async function main() {
211211
) {
212212
const { stdout, stderr } = await execa(
213213
'npm',
214-
['view', 'react@canary', 'version'],
214+
['--silent', 'view', 'react@canary', 'version'],
215215
{
216216
// Avoid "Usage Error: This project is configured to use pnpm".
217217
cwd: '/tmp',

0 commit comments

Comments
 (0)