diff options
| author | 2022-04-28 15:27:11 +0300 | |
|---|---|---|
| committer | 2022-04-28 15:29:33 +0300 | |
| commit | 53af0877444ea6c14b1ad5baec94afbeebc5e5e0 (patch) | |
| tree | 837fba9d78c895243f598c95916bff4a4c56f609 /src/remove.zig | |
| parent | Add Installation.isActive, use it (diff) | |
| download | zup-53af0877444ea6c14b1ad5baec94afbeebc5e5e0.tar.gz zup-53af0877444ea6c14b1ad5baec94afbeebc5e5e0.tar.xz zup-53af0877444ea6c14b1ad5baec94afbeebc5e5e0.zip | |
Added support for config files
Diffstat (limited to 'src/remove.zig')
| -rw-r--r-- | src/remove.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/remove.zig b/src/remove.zig index ad1a610..f795df7 100644 --- a/src/remove.zig +++ b/src/remove.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 = | 8 | pub const params = |
| @@ -13,7 +13,9 @@ pub const description = "Removes an installed Zig version. Run `zup list -i` to | |||
| 13 | pub const min_args = 1; | 13 | pub const min_args = 1; |
| 14 | pub const max_args = 1; | 14 | pub const max_args = 1; |
| 15 | 15 | ||
| 16 | pub fn main(comptime Result: type, allocator: Allocator, res: Result) !void { | 16 | pub fn main(comptime Result: type, config: Config, res: Result) !void { |
| 17 | const allocator = config.allocator; | ||
| 18 | |||
| 17 | const name = res.positionals[0]; | 19 | const name = res.positionals[0]; |
| 18 | 20 | ||
| 19 | if (!try Installation.isInstalled(allocator, name)) { | 21 | if (!try Installation.isInstalled(allocator, name)) { |