Skip to content

Commit

Permalink
fix(cli): initialising in projects using Yarn v3 (#2025)
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak authored Jan 24, 2024
1 parent 8c77eef commit b15e168
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/react-native-macos-init/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ async function getLatestMatchingReactNativeMacOSVersion(
} catch (err) {
printError(`No version of ${printPkg(MACOSPKG, versionSemVer)} found!`);
process.exit(EXITCODE_NO_MATCHING_RNMACOS);
return '';
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b15e168

Please sign in to comment.