diff options
author | 2021-10-14 14:49:48 -0700 | |
---|---|---|
committer | 2021-10-14 14:49:48 -0700 | |
commit | 901d7d8759dd4bb1cd4bea6cd18d57137afd3505 (patch) | |
tree | 38e951ddbeca7e514614bfe13eaecf65e095f4b9 /src | |
parent | 4b618f9ad1a45f6819dcb65e9b6b5b859e0df9fd (diff) | |
download | bun-901d7d8759dd4bb1cd4bea6cd18d57137afd3505.tar.gz bun-901d7d8759dd4bb1cd4bea6cd18d57137afd3505.tar.zst bun-901d7d8759dd4bb1cd4bea6cd18d57137afd3505.zip |
Add doc explaining bun-create
Diffstat (limited to 'src')
-rw-r--r-- | src/cli.zig | 2 | ||||
-rw-r--r-- | src/which.zig | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cli.zig b/src/cli.zig index c0ee57a5d..7a20cc3b0 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -519,7 +519,7 @@ pub const Command = struct { pub fn create(allocator: *std.mem.Allocator, log: *logger.Log, comptime command: Command.Tag) anyerror!Context { return Command.Context{ - .args = if (comptime command != Command.Tag.CreateCommand) + .args = if (comptime command != Command.Tag.CreateCommand) try Arguments.parse(allocator, command) else std.mem.zeroes(Api.TransformOptions), diff --git a/src/which.zig b/src/which.zig index 7cb65cbe2..0b8e5f1f8 100644 --- a/src/which.zig +++ b/src/which.zig @@ -5,7 +5,7 @@ fn isValid(buf: *[std.fs.MAX_PATH_BYTES]u8, segment: []const u8, bin: []const u8 buf[segment.len] = std.fs.path.sep; std.mem.copy(u8, buf[segment.len + 1 ..], bin); buf[segment.len + 1 + bin.len ..][0] = 0; - var filepath = buf[0 .. segment.len + 1 + bin.len :0]; + const filepath = buf[0 .. segment.len + 1 + bin.len :0]; std.os.accessZ(filepath, std.os.X_OK) catch return null; return @intCast(u16, filepath.len); |