summaryrefslogtreecommitdiff
path: root/src/switch.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/switch.zig')
-rw-r--r--src/switch.zig6
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");
2const xdg = @import("xdg"); 2const xdg = @import("xdg");
3const zup = @import("zup"); 3const zup = @import("zup");
4 4
5const Allocator = std.mem.Allocator; 5const Config = zup.Config;
6const Installation = zup.Installation; 6const Installation = zup.Installation;
7 7
8pub const params = "<NAME>"; 8pub const params = "<NAME>";
@@ -10,7 +10,9 @@ pub const description = "Switches to a Zig version. Run `zup list -i` to see in
10pub const min_args = 1; 10pub const min_args = 1;
11pub const max_args = 1; 11pub const max_args = 1;
12 12
13pub fn main(comptime Result: type, allocator: Allocator, res: Result) !void { 13pub 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(