diff options
Diffstat (limited to 'src/switch.zig')
| -rw-r--r-- | src/switch.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/switch.zig b/src/switch.zig index 058067d..e5d243f 100644 --- a/src/switch.zig +++ b/src/switch.zig | |||
| @@ -2,7 +2,7 @@ const std = @import("std"); | |||
| 2 | const xdg = @import("xdg"); | 2 | const xdg = @import("xdg"); |
| 3 | const zup = @import("zup"); | 3 | const zup = @import("zup"); |
| 4 | 4 | ||
| 5 | const Allocator = std.mem.Allocator; | 5 | const Config = zup.Config; |
| 6 | const Installation = zup.Installation; | 6 | const Installation = zup.Installation; |
| 7 | 7 | ||
| 8 | pub const params = "<NAME>"; | 8 | pub const params = "<NAME>"; |
| @@ -10,7 +10,9 @@ pub const description = "Switches to a Zig version. Run `zup list -i` to see in | |||
| 10 | pub const min_args = 1; | 10 | pub const min_args = 1; |
| 11 | pub const max_args = 1; | 11 | pub const max_args = 1; |
| 12 | 12 | ||
| 13 | pub fn main(comptime Result: type, allocator: Allocator, res: Result) !void { | 13 | pub fn main(comptime Result: type, config: Config, res: Result) !void { |
| 14 | const allocator = config.allocator; | ||
| 15 | |||
| 14 | const name = res.positionals[0]; | 16 | const name = res.positionals[0]; |
| 15 | if (!try Installation.isInstalled(allocator, name)) { | 17 | if (!try Installation.isInstalled(allocator, name)) { |
| 16 | std.log.err( | 18 | std.log.err( |