Skip to content

Commit

Permalink
refactor(App): Format code
Browse files Browse the repository at this point in the history
Signed-off-by: PrajwalCH <prajwal.chapagain58@gmail.com>
  • Loading branch information
prajwalch committed Jun 20, 2023
1 parent baea7b2 commit 0b0cf0c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/App.zig
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ pub fn displaySubcommandHelp(self: *App) !void {
}

fn handleHelpOption(self: *App) !void {
// Set the `Help` of a subcommand present on the command line with the `-h` or `--help` option
// remains null if none of the subcommands were present
if (help.findSubcommand(self.rootCommand(), &self.arg_matches.?)) |subcmd| {
self.subcommand_help = try help.Help.init(self.allocator, self.rootCommand(), subcmd);
self.subcommand_help = try help.Help.init(
self.allocator,
self.rootCommand(),
subcmd,
);
}
try self.displayHelpAndExitIfFound();
}
Expand Down

0 comments on commit 0b0cf0c

Please sign in to comment.