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:
parent
a6e1e33a50
commit
3dac49a4f5
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue