diff options
| author | 2025-07-22 05:56:17 +0300 | |
|---|---|---|
| committer | 2025-07-22 05:56:17 +0300 | |
| commit | a43867dd7d02937a233a039eec7c7f43977b0b0c (patch) | |
| tree | 1fe7487f67df24ed4c42251da81f35320ed2b9fa /src/main.zig | |
| parent | Update zig (diff) | |
| download | zup-0.6.0.tar.gz zup-0.6.0.tar.xz zup-0.6.0.zip | |
Release 0.6.00.6.0
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig index 0fe6f16..c7e3844 100644 --- a/src/main.zig +++ b/src/main.zig | |||
| @@ -99,11 +99,9 @@ const Help = struct { | |||
| 99 | pub const max_args = 1; | 99 | pub const max_args = 1; |
| 100 | 100 | ||
| 101 | pub fn main(comptime Result: type, _: Config, res: Result) !void { | 101 | pub fn main(comptime Result: type, _: Config, res: Result) !void { |
| 102 | if (res.positionals.len == 0) { | 102 | const cmd = res.positionals[0] orelse { |
| 103 | return mainHelp(); | 103 | return mainHelp(); |
| 104 | } | 104 | }; |
| 105 | |||
| 106 | const cmd = res.positionals[0]; | ||
| 107 | return dispatch(cmd, "help", unknownHelp, .{cmd}); | 105 | return dispatch(cmd, "help", unknownHelp, .{cmd}); |
| 108 | } | 106 | } |
| 109 | 107 | ||