Skip to content

Commit 3a2a691

Browse files
committed
Throw non-empty directory error using preferred mechanism
The error was reported using a mechanism that no longer seems to be supported by yeoman. Throwing an error seems to be the preferred method now.
1 parent 2d20eaf commit 3a2a691

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/generator-widget/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed the error that is thrown when the target directory is not empty. (#123)
12+
913
## [10.15.0] - 2024-09-24
1014

1115
### Changed

packages/generator-widget/generators/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MxGenerator extends Generator {
3232

3333
if ((await dirExists(fullDestinationPath)) && !(await isDirEmpty(fullDestinationPath))) {
3434
this.log(text.BANNER);
35-
this.env.error(Error(text.DIR_NOT_EMPTY_ERROR));
35+
throw new Error(text.DIR_NOT_EMPTY_ERROR);
3636
}
3737
}
3838

packages/generator-widget/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/generator-widget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mendix/generator-widget",
3-
"version": "10.15.0",
3+
"version": "10.15.1",
44
"description": "Mendix Pluggable Widgets Generator",
55
"engines": {
66
"node": ">=16"

0 commit comments

Comments
 (0)