From 3dac49a4f564c44b7e6b9deed3645d2c9971954b Mon Sep 17 00:00:00 2001 From: Eric Rozell Date: Wed, 14 Sep 2016 13:35:36 -0700 Subject: [PATCH] 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 --- local-cli/core/getCommands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/core/getCommands.js b/local-cli/core/getCommands.js index 96eaaad0c..7cd50dec1 100644 --- a/local-cli/core/getCommands.js +++ b/local-cli/core/getCommands.js @@ -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)),