Correctly reference cwd instead of __dirname

Summary:
This is for issue #7670.  I consider this a typo, but maybe you don't.

In order to see the problem, you need to have the packager search for the configuration in a place that doesn't have one and the default configuration can't be provided.  It's likely that no one is doing this and also why this probably wasn't seen.
Closes https://github.com/facebook/react-native/pull/7671

Differential Revision: D3350412

fbshipit-source-id: 5f9b520f7d5cbc749e2b898e7bbf2cd84d81ace0
This commit is contained in:
Jeremy Wyld 2016-05-25 17:28:39 -07:00 коммит произвёл Facebook Github Bot 9
Родитель 7e62c1165b
Коммит af149b3a11
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -33,7 +33,7 @@ const Config = {
const parentDir = findParentDirectory(cwd, RN_CLI_CONFIG); const parentDir = findParentDirectory(cwd, RN_CLI_CONFIG);
if (!parentDir && !defaultConfig) { if (!parentDir && !defaultConfig) {
throw new Error( throw new Error(
`Can't find "rn-cli.config.js" file in any parent folder of "${__dirname}"` `Can't find "rn-cli.config.js" file in any parent folder of "${cwd}"`
); );
} }