Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for .yo-repository directory #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix for .yo-repository directory
yo creates a directory .yo-repository which previously caused generator-mendix to be unable to create a new widget
  • Loading branch information
tomhmoses committed May 7, 2020
commit 389f068a2a6b28136c11e955f562d6be4b7ab219
9 changes: 6 additions & 3 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ module.exports = class extends Generator {
done();
}
} else if (!extfs.isEmptySync(this.destinationRoot())) {
this.log(banner);
this.log(text.DIR_NOT_EMPTY_ERROR);
this.FINISHED = true;
var dirs = extfs.getDirsSync(this.destinationRoot());
if (!(dirs.length == 1 && dirs[0] == '.yo-repository')) {
this.log(banner);
this.log(text.DIR_NOT_EMPTY_ERROR);
this.FINISHED = true;
}
done();
} else {
done();
Expand Down