Get rid of FBism in `Config`
Summary: `cwd` was needed for FB-internal reasons, was untyped, and goes away. Reviewed By: martinbigio Differential Revision: D4986076 fbshipit-source-id: b093476cabc4f73fb63d37052f4041073c174f06
This commit is contained in:
parent
6a4e113736
commit
b9fb229c80
|
@ -119,7 +119,7 @@ const Config = {
|
||||||
const configPath = findConfigPath(startDir);
|
const configPath = findConfigPath(startDir);
|
||||||
return configPath
|
return configPath
|
||||||
? this.loadFile(configPath, startDir)
|
? this.loadFile(configPath, startDir)
|
||||||
: {...defaultConfig, cwd: startDir};
|
: {...defaultConfig};
|
||||||
},
|
},
|
||||||
|
|
||||||
loadFile(
|
loadFile(
|
||||||
|
@ -131,7 +131,7 @@ const Config = {
|
||||||
require(pathToConfig) :
|
require(pathToConfig) :
|
||||||
// $FlowFixMe nope
|
// $FlowFixMe nope
|
||||||
require(path.join(cwd, pathToConfig));
|
require(path.join(cwd, pathToConfig));
|
||||||
return {...defaultConfig, ...config, cwd};
|
return {...defaultConfig, ...config};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue