From 1812d402ca44b1a7bf185738f79d8d625042973c Mon Sep 17 00:00:00 2001 From: Basit Ali Date: Sat, 23 Mar 2019 01:42:18 +0500 Subject: [PATCH] Set project directory on PackageManager Fixes https://github.com/react-native-community/react-native-cli/issues/260 and https://github.com/facebook/react-native/issues/24103 by setting project directory on PackageManager which is needed to check for yarn.lock file. --- packages/cli/src/commands/init/init.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/commands/init/init.js b/packages/cli/src/commands/init/init.js index 0eb95f9f3..86df93c25 100644 --- a/packages/cli/src/commands/init/init.js +++ b/packages/cli/src/commands/init/init.js @@ -52,6 +52,7 @@ function generateProject(destinationRoot, newProjectName, options) { const pkgJson = require('react-native/package.json'); const reactVersion = pkgJson.peerDependencies.react; + PackageManager.setProjectDir(destinationRoot); createProjectFromTemplate( destinationRoot, newProjectName,