This commit is contained in:
Nikolas Hor 2026-03-18 16:09:53 -07:00 committed by GitHub
commit 6c30bbc867
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 4 deletions

View File

@ -735,12 +735,13 @@ class ConfigCollector {
// Skip prompts mode: use all defaults without asking // Skip prompts mode: use all defaults without asking
if (this.skipPrompts) { if (this.skipPrompts) {
await prompts.log.info(`Using default configuration for ${moduleDisplayName}`); await prompts.log.info(`Using default configuration for ${moduleDisplayName}`);
// Use defaults for all questions // Use defaults for all questions; use empty string for fields without defaults
for (const question of questions) { for (const question of questions) {
const hasDefault = question.default !== undefined && question.default !== null && question.default !== ''; if (typeof question.default === 'function') {
if (hasDefault && typeof question.default !== 'function') { continue;
allAnswers[question.name] = question.default;
} }
const hasDefault = question.default !== undefined && question.default !== null && question.default !== '';
allAnswers[question.name] = hasDefault ? question.default : '';
} }
} else { } else {
if (!this._silentConfig) await prompts.log.step(`Configuring ${moduleDisplayName}`); if (!this._silentConfig) await prompts.log.step(`Configuring ${moduleDisplayName}`);