Skip to content

Commit

Permalink
fear(chore): search for semantic.json from current workspace path
Browse files Browse the repository at this point in the history
In some situations (for example in yarn workspaces), mostly within custom build chains, the users semantic.json cannot be found because the requireDotFile starts from within the fomantic folder.
Instead , the second parameter should be given as process.cwd() to support starting the search in a different folder
  • Loading branch information
lubber-de authored May 23, 2020
1 parent 544caec commit e0ccbfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/config/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var

try {
// looks for config file across all parent directories
userConfig = requireDotFile('semantic.json');
userConfig = requireDotFile('semantic.json', process.cwd());
}
catch(error) {
if(error.code === 'MODULE_NOT_FOUND') {
Expand Down
2 changes: 1 addition & 1 deletion tasks/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var
module.exports = function (callback) {

var
currentConfig = requireDotFile('semantic.json'),
currentConfig = requireDotFile('semantic.json', process.cwd()),
manager = install.getPackageManager(),
rootQuestions = questions.root,
installFolder = false,
Expand Down

0 comments on commit e0ccbfc

Please sign in to comment.