diff options
Diffstat (limited to 'src/cmd/rmdir.zig')
-rw-r--r-- | src/cmd/rmdir.zig | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cmd/rmdir.zig b/src/cmd/rmdir.zig index a1c3cc0..3033ffa 100644 --- a/src/cmd/rmdir.zig +++ b/src/cmd/rmdir.zig @@ -1,6 +1,5 @@ const std = @import("std"); const Allocator = std.mem.Allocator; -const print = std.debug.print; const types = @import("./lib/types.zig"); const CommandStatus = types.CommandStatus; @@ -21,11 +20,8 @@ pub const Rmdir = struct { error.NotDir => "The system cannot find the path specified\n", else => "Unable to remove directory\n", }; - if (ctx.output_capture) |capture| { - try capture.write(error_msg); - } else { - print("{s}", .{error_msg}); - } + var writer = ctx.output_writer; + try writer.write(error_msg); return CommandStatus{ .Code = 1 }; }; |