Update getCommands.js

Summary:
Fixes issue with path for Windows. cc grabbou
Closes https://github.com/facebook/react-native/pull/9898

Differential Revision: D3864923

fbshipit-source-id: e785bfe0f01f9cf0c1964518fed03e2090300a31
This commit is contained in:
Eric Rozell 2016-09-14 13:35:36 -07:00 committed by Facebook Github Bot 9
parent a6e1e33a50
commit 3dac49a4f5
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module.exports = function getCommands() {
const appRoot = process.cwd();
const plugins = findPlugins([appRoot])
.map(pathToCommands => {
const name = pathToCommands.split('/')[0];
const name = pathToCommands.split(path.sep)[0];
return attachPackage(
require(path.join(appRoot, 'node_modules', pathToCommands)),