diff options
| -rw-r--r-- | src/list.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/list.zig b/src/list.zig index d97ba87..e5daa87 100644 --- a/src/list.zig +++ b/src/list.zig | |||
| @@ -33,7 +33,8 @@ pub fn main(comptime Result: type, allocator: Allocator, res: Result) !void { | |||
| 33 | if (list_active) { | 33 | if (list_active) { |
| 34 | var active = try Installation.getActiveName(allocator); | 34 | var active = try Installation.getActiveName(allocator); |
| 35 | defer if (active) |s| allocator.free(s); | 35 | defer if (active) |s| allocator.free(s); |
| 36 | try printActive(active); | 36 | // TODO: zig-bug should I really need to do this? |
| 37 | try printActive(if (active) |a| a else null); | ||
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | if (list_installed) { | 40 | if (list_installed) { |
| @@ -49,8 +50,7 @@ pub fn main(comptime Result: type, allocator: Allocator, res: Result) !void { | |||
| 49 | } | 50 | } |
| 50 | } | 51 | } |
| 51 | 52 | ||
| 52 | // TODO: zig-bug active should be ?[]const u8 | 53 | fn printActive(active: ?[]const u8) !void { |
| 53 | fn printActive(active: ?[]u8) !void { | ||
| 54 | const writer = std.io.getStdOut().writer(); | 54 | const writer = std.io.getStdOut().writer(); |
| 55 | try writer.writeAll("Active installation: "); | 55 | try writer.writeAll("Active installation: "); |
| 56 | if (active) |act| { | 56 | if (active) |act| { |