summaryrefslogtreecommitdiff
path: root/src/cmd/help.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/help.zig')
-rw-r--r--src/cmd/help.zig14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/cmd/help.zig b/src/cmd/help.zig
index 4c91464..0a19e98 100644
--- a/src/cmd/help.zig
+++ b/src/cmd/help.zig
@@ -48,11 +48,8 @@ fn showGeneralHelp(ctx: CommandContext) !CommandStatus {
\\
;
- if (ctx.output_capture) |output| {
- try output.write(help_text);
- } else {
- try std.io.getStdOut().writeAll(help_text);
- }
+ var writer = ctx.output_writer;
+ try writer.write(help_text);
return CommandStatus{ .Code = 0 };
}
@@ -63,11 +60,8 @@ fn showCommandHelp(command: []const u8, ctx: CommandContext) !CommandStatus {
const help_text = getCommandSpecificHelp(cmd_upper);
- if (ctx.output_capture) |output| {
- try output.write(help_text);
- } else {
- try std.io.getStdOut().writeAll(help_text);
- }
+ var writer = ctx.output_writer;
+ try writer.write(help_text);
return CommandStatus{ .Code = 0 };
}