Skip to content

Commit 51e0c45

Browse files
authored
feat(build): improve error message for when semantic.json is not found
Improve error message for when semantic.json cannot be found. I was having an issue with my setup where semantic.json couldn't be found. Looking at require-dot-file, it seems false is returned when semantic.json isn't found. An error is printed only when the MODULE_NOT_FOUND error is thrown which wasn't happening in my case.
1 parent a1262ef commit 51e0c45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tasks/config/user.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ var
2929
try {
3030
// looks for config file across all parent directories
3131
userConfig = requireDotFile('semantic.json', process.cwd());
32+
if(userConfig.valueOf() === false) {
33+
console.error('No semantic.json config found');
34+
}
3235
}
3336
catch(error) {
3437
if(error.code === 'MODULE_NOT_FOUND') {
35-
console.error('No semantic.json config found');
38+
console.error('require-dot-file module not found');
3639
}
3740
}
3841

0 commit comments

Comments
 (0)