From 8c0cbae3e149be24f50e1afc5168e5ab634a4f37 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Mon, 2 Oct 2023 21:38:30 +0200 Subject: [PATCH] fix: detect package manager when configuring bob --- packages/react-native-builder-bob/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-native-builder-bob/src/index.ts b/packages/react-native-builder-bob/src/index.ts index 47428d8b..017404e0 100644 --- a/packages/react-native-builder-bob/src/index.ts +++ b/packages/react-native-builder-bob/src/index.ts @@ -327,6 +327,10 @@ yargs } } + const packageManager = (await fs.pathExists(path.join(root, 'yarn.lock'))) + ? 'yarn' + : 'npm'; + console.log( dedent(` Project ${kleur.yellow(pkg.name)} configured successfully! @@ -335,7 +339,7 @@ yargs `${kleur.bold('Perform last steps')} by running` )}${kleur.gray(':')} - ${kleur.gray(':')} yarn + ${kleur.gray('$')} ${packageManager} install ${kleur.yellow('Good luck!')} `)