Skip to content

Commit

Permalink
fix prompt condition (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Dec 28, 2024
1 parent 6072fe4 commit 67f59f2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generators/java-audit/__snapshots__/generator.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using
}
`;

exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework undefined > should succeed 1`] = `
exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework null > should succeed 1`] = `
{
".jhipster/Audited.json": {
"stateCleared": "modified",
Expand Down
2 changes: 1 addition & 1 deletion generators/java-audit/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default asCommand({
prompt: {
type: 'confirm',
message: 'Do you want to add an audit log page for entities?',
default: true,
},
default: true,
scope: 'blueprint',
},
auditUpdateType: {
Expand Down
4 changes: 4 additions & 0 deletions generators/java-audit/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,8 @@ export default class extends BaseApplicationGenerator {
},
};
}

shouldAskForPrompts() {
return this.initialRun;
}
}
2 changes: 1 addition & 1 deletion generators/java-audit/generator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const SUB_GENERATOR = 'java-audit';
const SUB_GENERATOR_NAMESPACE = `jhipster-entity-audit:${SUB_GENERATOR}`;

describe('SubGenerator java-audit of entity-audit JHipster blueprint', () => {
for (const auditFramework of [undefined, 'javers', 'custom']) {
for (const auditFramework of [null, 'javers', 'custom']) {
describe(`run using auditFramework ${auditFramework}`, () => {
beforeAll(async function () {
await helpers
Expand Down

0 comments on commit 67f59f2

Please sign in to comment.