diff options
| author | 2022-04-26 00:44:24 +0300 | |
|---|---|---|
| committer | 2022-04-26 00:44:24 +0300 | |
| commit | 595477339b9e7dd696aaa31e21308f48c5a6109d (patch) | |
| tree | 96dca0017a60c40dd5437645cb11d8ff92318baf /src/install.zig | |
| parent | Add a missing const (diff) | |
| download | zup-595477339b9e7dd696aaa31e21308f48c5a6109d.tar.gz zup-595477339b9e7dd696aaa31e21308f48c5a6109d.tar.xz zup-595477339b9e7dd696aaa31e21308f48c5a6109d.zip | |
Add Installation.isActive, use it
Diffstat (limited to 'src/install.zig')
| -rw-r--r-- | src/install.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/install.zig b/src/install.zig index 7a52d44..ebf1c01 100644 --- a/src/install.zig +++ b/src/install.zig | |||
| @@ -87,8 +87,9 @@ pub fn perform(allocator: Allocator, name: []const u8, force: bool, available: I | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | std.log.info("Installed to {s}", .{installation_dir}); | 89 | std.log.info("Installed to {s}", .{installation_dir}); |
| 90 | // TODO: Check if it is already active | 90 | if (!try Installation.isActive(allocator, name)) { |
| 91 | std.log.info("If you want to use this installation, run `zup switch {s}`", .{name}); | 91 | std.log.info("If you want to use this installation, run `zup switch {s}`", .{name}); |
| 92 | } | ||
| 92 | } | 93 | } |
| 93 | 94 | ||
| 94 | fn preparePathname(allocator: Allocator, installation_dir: []const u8, source: []const u8) ![:0]u8 { | 95 | fn preparePathname(allocator: Allocator, installation_dir: []const u8, source: []const u8) ![:0]u8 { |