Skip to content

Commit ac02a9f

Browse files
authored
Fix crash running vcpkg help commands reported by @JavierMatosD (#1199)
1 parent 962dd60 commit ac02a9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vcpkg/commands.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ namespace vcpkg
148148

149149
static void format_command_usage_entry(HelpTableFormatter& table, const CommandMetadata& metadata)
150150
{
151-
table.format(metadata.name, metadata.synopsis.to_string());
151+
if (metadata.synopsis)
152+
{
153+
table.format(metadata.name, metadata.synopsis.to_string());
154+
}
152155
}
153156

154157
void print_zero_args_usage()

0 commit comments

Comments
 (0)