Skip to content

Commit

Permalink
fix(cli): initialising in projects using Yarn v3
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Jan 23, 2024
1 parent 740732e commit 5a742f2
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 5a742f2

Please sign in to comment.