Skip to content

Commit

Permalink
fix(configs): don't validate .fusumarc
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Jun 23, 2019
1 parent 51b1405 commit e76fe22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/configs/src/fusumarc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ async function init(baseDir) {
async function read(baseDir) {
const file = pSearch(baseDir, configFileNames);

if (file === null) {
throw new Error('Could not find a configure file. init command creates a configure file.');
if (!file) {
return config;
}

switch (extname(file)) {
case '.yml':
return yaml.safeLoad(await readFileAsync(file, 'utf8'));
case '.js':
return require(file);
default:
return config;
}
}

Expand Down

0 comments on commit e76fe22

Please sign in to comment.