Skip to content

Commit

Permalink
Correctly reference cwd instead of __dirname
Browse files Browse the repository at this point in the history
Summary:
This is for issue facebook#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 facebook#7671

Differential Revision: D3350412

fbshipit-source-id: 5f9b520f7d5cbc749e2b898e7bbf2cd84d81ace0
  • Loading branch information
Jeremy Wyld authored and samerce committed Aug 23, 2016
1 parent e2fde96 commit da82121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local-cli/util/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Config = {
const parentDir = findParentDirectory(cwd, RN_CLI_CONFIG);
if (!parentDir && !defaultConfig) {
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}"`
);
}

Expand Down

0 comments on commit da82121

Please sign in to comment.