diff --git a/src/commands/dev/generate/flag.ts b/src/commands/dev/generate/flag.ts index 9760fbb..bcafe18 100644 --- a/src/commands/dev/generate/flag.ts +++ b/src/commands/dev/generate/flag.ts @@ -87,7 +87,9 @@ const findExistingCommands = async (topicSeparator: string): Promise = .sort(); const updateMarkdownFile = async (answers: FlagAnswers, commandName: string): Promise => - fs.appendFile( - path.join('messages', `${commandName.split(':').join('.')}.md`), - `${os.EOL}# flags.${answers.name}.summary${os.EOL}${os.EOL}${answers.summary}${os.EOL}` - ); + answers.summary + ? fs.appendFile( + path.join('messages', `${commandName.split(':').join('.')}.md`), + `${os.EOL}# flags.${answers.name}.summary${os.EOL}${os.EOL}${answers.summary}${os.EOL}` + ) + : undefined;