Skip to content

Commit

Permalink
extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaiblaga89 committed May 22, 2021
1 parent 7d1793f commit 4f23f10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/rnv/src/core/systemManager/npmUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export const installPackageDependencies = async (c, failOnError = false) => {
// no lock file check cli option
if (['yarn', 'npm'].includes(c.program.packageManager)) {
command = c.program.packageManager === 'yarn' ? 'yarn' : 'npm install';
if (command === 'yarn' && !isYarnInstalled) throw new Error('You specified yarn as packageManager but it\'s not installed');
} else {
throw new Error(`Unsupported package manager ${c.program.packageManager}. Only yarn and npm are supported at the moment.`);
}
Expand Down

0 comments on commit 4f23f10

Please sign in to comment.