Skip to content

Commit

Permalink
local-cli: restore symlink scanning in default case
Browse files Browse the repository at this point in the history
Commit 9a77ff5 seems to disable symlink scanning for apps that don't
have a config file. This commit should restore that, without breaking
those with a config file.

Fixes facebook#21735
  • Loading branch information
peat-psuwit committed Oct 11, 2018
1 parent 83da74b commit cc7c072
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions local-cli/util/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@ const resolveSymlinksForRoots = roots =>
* error found when Flow v0.70 was deployed. To see the error delete this
* comment and run Flow. */
(arr, rootPath) => arr.concat(findSymlinkedModules(rootPath, roots)),
[...roots],
[],
);

const getWatchFolders = () => {
const root = process.env.REACT_NATIVE_APP_ROOT;
if (root) {
return resolveSymlinksForRoots([path.resolve(root)]);
const rootFullPath = path.resolve(root);
return [rootFullPath, ...resolveSymlinksForRoots([rootFullPath])];
}
return [];
return resolveSymlinksForRoots([getProjectRoot()]);
};

const getBlacklistRE = () => {
Expand Down

0 comments on commit cc7c072

Please sign in to comment.