diff options
author | 2022-02-25 02:03:54 -0800 | |
---|---|---|
committer | 2022-02-25 02:03:54 -0800 | |
commit | 64b0087e840b773ae4a603e973ca490350e1d6a4 (patch) | |
tree | c6ca45bb19387a782f33b1fa80c12da37df32c52 | |
parent | fe5ef864f1de46e77772fb05a9980d7b6d8db3a6 (diff) | |
download | bun-64b0087e840b773ae4a603e973ca490350e1d6a4.tar.gz bun-64b0087e840b773ae4a603e973ca490350e1d6a4.tar.zst bun-64b0087e840b773ae4a603e973ca490350e1d6a4.zip |
Fix alignment bug with `bun --help`
Diffstat (limited to '')
-rw-r--r-- | src/deps/zig-clap/clap.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deps/zig-clap/clap.zig b/src/deps/zig-clap/clap.zig index 65921d9d0..bf59cc5cd 100644 --- a/src/deps/zig-clap/clap.zig +++ b/src/deps/zig-clap/clap.zig @@ -111,7 +111,7 @@ fn parseParamRest(line: []const u8) Param(Help) { const len = mem.indexOfScalar(u8, line, '>') orelse break :blk; const takes_many = mem.startsWith(u8, line[len + 1 ..], "..."); const takes_one_optional = mem.startsWith(u8, line[len + 1 ..], "?"); - const help_start = len + 1 + @as(usize, 3) * @boolToInt(takes_many); + const help_start = len + 1 + @as(usize, 3) * @boolToInt(takes_many) + (@as(usize, 1) * @boolToInt(takes_one_optional)); return .{ .takes_value = if (takes_many) Values.many else if (takes_one_optional) Values.one_optional else Values.one, .id = .{ |