[react-packager] Make sure projectRoots is converted to an array

This commit is contained in:
Amjad Masad 2015-03-20 14:29:42 -07:00
parent 12233ae65f
commit 98ed9422c2
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,11 @@ var options = parseCommandLine([{
description: 'add another root(s) to be used by the packager in this project',
}]);
if (!options.projectRoots) {
if (options.projectRoots) {
if (!Array.isArray(options.projectRoots)) {
options.projectRoots = options.projectRoots.split(',');
}
} else {
options.projectRoots = [path.resolve(__dirname, '..')];
}