Skip to content

Commit

Permalink
ignore non existting files
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Oct 30, 2024
1 parent 4787445 commit dc129f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generators/generate-blueprint/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export default class extends BaseGenerator {
if (!this.isJhipsterVersionLessThan('8.7.2')) return;
for (const generator of Object.keys(this.application[GENERATORS])) {
const commandFile = `${this.application.blueprintsPath}${generator}/command.${application.blueprintMjsExtension}`;
this.editFile(commandFile, content =>
this.editFile(commandFile, { ignoreNonExisting: true }, content =>
content
.replace(
`/**
Expand All @@ -298,7 +298,9 @@ export default class extends BaseGenerator {
);

const generatorSpec = `${this.application.blueprintsPath}${generator}/generator.spec.${application.blueprintMjsExtension}`;
this.editFile(generatorSpec, content => content.replaceAll(/blueprint: '([\w-]*)'/g, "blueprint: ['$1']"));
this.editFile(generatorSpec, { ignoreNonExisting: true }, content =>
content.replaceAll(/blueprint: '([\w-]*)'/g, "blueprint: ['$1']"),
);
}
},
packageJson() {
Expand Down

0 comments on commit dc129f0

Please sign in to comment.