Skip to content

Commit

Permalink
fix: no empty summary for standard flags (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc authored Jul 19, 2024
1 parent 5f89a95 commit f560fac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/commands/dev/generate/flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const findExistingCommands = async (topicSeparator: string): Promise<string[]> =
.sort();

const updateMarkdownFile = async (answers: FlagAnswers, commandName: string): Promise<void> =>
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;

0 comments on commit f560fac

Please sign in to comment.