From 5a742f2473390b7460cab50f37a5611507682724 Mon Sep 17 00:00:00 2001 From: szymonrybczak Date: Tue, 23 Jan 2024 11:33:42 +0100 Subject: [PATCH] fix(cli): initialising in projects using Yarn v3 --- packages/react-native-macos-init/src/cli.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native-macos-init/src/cli.ts b/packages/react-native-macos-init/src/cli.ts index bade48686b3024..ee62a8a80c80c3 100644 --- a/packages/react-native-macos-init/src/cli.ts +++ b/packages/react-native-macos-init/src/cli.ts @@ -185,7 +185,6 @@ async function getLatestMatchingReactNativeMacOSVersion( } catch (err) { printError(`No version of ${printPkg(MACOSPKG, versionSemVer)} found!`); process.exit(EXITCODE_NO_MATCHING_RNMACOS); - return ''; } } @@ -290,7 +289,7 @@ You can either downgrade your version of ${chalk.yellow(RNPKG)} to ${chalk.cyan( ); const pkgmgr = isProjectUsingYarn(process.cwd()) - ? `yarn add${verbose ? '' : ' -s'}` + ? `yarn add${verbose ? '' : ' --silent'}` : `npm install --save${verbose ? '' : ' --silent'}`; const execOptions = verbose ? {stdio: 'inherit' as 'inherit'} : {}; execSync(`${pkgmgr} "${MACOSPKG}@${version}"`, execOptions);