mirror of https://github.com/status-im/metro.git
[react-packager] Make sure projectRoots is converted to an array
This commit is contained in:
parent
12233ae65f
commit
98ed9422c2
|
@ -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, '..')];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue